pub struct Args<Cli: CommandLine> {
pub url: Option<Url>,
pub pinned_certificate: Option<PathBuf>,
pub token_id: Option<u64>,
pub username: Option<String>,
pub command: Command<Cli>,
}
Expand description
The command line interface for bonsaidb
.
Fields§
§url: Option<Url>
A url to a remote server.
pinned_certificate: Option<PathBuf>
A pinned certificate to use when connecting to url
.
token_id: Option<u64>
A token ID to authenticate as before executing the command. Use
environment variable BONSAIDB_TOKEN_SECRET
to provide the
username: Option<String>
A user to authenticate as before executing the command. The password will be prompted for over stdin. When writing a script for headless automation, token authentication should be preferred.
command: Command<Cli>
The command to execute on the connection specified.
Implementations§
Trait Implementations§
source§impl<Cli: CommandLine> Args for Args<Cli>
impl<Cli: CommandLine> Args for Args<Cli>
source§fn group_id() -> Option<Id>
fn group_id() -> Option<Id>
Report the [
ArgGroup::id
][crate::ArgGroup::id] for this set of argumentssource§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
source§impl<Cli: CommandLine> CommandFactory for Args<Cli>
impl<Cli: CommandLine> CommandFactory for Args<Cli>
source§impl<Cli: CommandLine> FromArgMatches for Args<Cli>
impl<Cli: CommandLine> FromArgMatches for Args<Cli>
source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches ) -> Result<Self, Error>
source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches ) -> Result<(), Error>
Assign values from
ArgMatches
to self
.source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches ) -> Result<(), Error>
Assign values from
ArgMatches
to self
.source§impl<Cli: CommandLine> Parser for Args<Cli>
impl<Cli: CommandLine> Parser for Args<Cli>
§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Parse from iterator, [exit][Error::exit] on error.
§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Parse from iterator, return Err on error.
§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Update from iterator, [exit][Error::exit] on error.
§fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
Update from iterator, return Err on error.
Auto Trait Implementations§
impl<Cli> RefUnwindSafe for Args<Cli>where
<Cli as CommandLine>::Backend: RefUnwindSafe,
<Cli as CommandLine>::Subcommand: RefUnwindSafe,
impl<Cli> Send for Args<Cli>
impl<Cli> Sync for Args<Cli>
impl<Cli> Unpin for Args<Cli>
impl<Cli> UnwindSafe for Args<Cli>
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more