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 try_parse() -> Result<Self, Error<RichFormatter>>
fn try_parse() -> Result<Self, Error<RichFormatter>>
Parse from
std::env::args_os()
, return Err on error.§fn parse_from<I, T>(itr: I) -> Selfwhere
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
fn parse_from<I, T>(itr: I) -> Selfwhere I: IntoIterator<Item = T>, T: Into<OsString> + Clone,
Parse from iterator, exit on error
§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error<RichFormatter>>where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error<RichFormatter>>where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,
Parse from iterator, return Err on error.
§fn update_from<I, T>(&mut self, itr: I)where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
fn update_from<I, T>(&mut self, itr: I)where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,
Update from iterator, exit on error
§fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error<RichFormatter>>where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error<RichFormatter>>where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,
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>where <Cli as CommandLine>::Backend: Unpin, <Cli as CommandLine>::Subcommand: Unpin,
impl<Cli> UnwindSafe for Args<Cli>where <Cli as CommandLine>::Backend: UnwindSafe, <Cli as CommandLine>::Subcommand: UnwindSafe,
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