pub enum Command<B = NoBackend>where
B: Backend,{
Certificate(Command),
Serve(Serve<B>),
Storage(StorageCommand),
}
Expand description
Available commands for bonsaidb server
.
Variants§
Certificate(Command)
Manage the server’s root certificate.
Serve(Serve<B>)
Execute the server.
Storage(StorageCommand)
Manage the server’s storage.
Implementations§
source§impl<B> Command<B>where
B: Backend,
impl<B> Command<B>where
B: Backend,
sourcepub async fn execute(
self,
configuration: ServerConfiguration<B>
) -> Result<(), BackendError<<B as Backend>::Error>>
pub async fn execute( self, configuration: ServerConfiguration<B> ) -> Result<(), BackendError<<B as Backend>::Error>>
Executes the command.
sourcepub async fn execute_on(
self,
server: CustomServer<B>
) -> Result<(), BackendError<<B as Backend>::Error>>
pub async fn execute_on( self, server: CustomServer<B> ) -> Result<(), BackendError<<B as Backend>::Error>>
Executes the command on server
.
Trait Implementations§
source§impl<B> FromArgMatches for Command<B>where
B: Backend,
impl<B> FromArgMatches for Command<B>where
B: Backend,
source§fn from_arg_matches(
__clap_arg_matches: &ArgMatches
) -> Result<Command<B>, Error>
fn from_arg_matches( __clap_arg_matches: &ArgMatches ) -> Result<Command<B>, Error>
source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches
) -> Result<Command<B>, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches ) -> Result<Command<B>, 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<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches ) -> Result<(), Error>
Assign values from
ArgMatches
to self
.source§impl<B> Parser for Command<B>where
B: Backend,
impl<B> Parser for Command<B>where
B: Backend,
§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.
source§impl<B> Subcommand for Command<B>where
B: Backend,
impl<B> Subcommand for Command<B>where
B: Backend,
source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
source§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Test whether
Self
can parse a specific subcommandAuto Trait Implementations§
impl<B> RefUnwindSafe for Command<B>where
B: RefUnwindSafe,
impl<B> Send for Command<B>
impl<B> Sync for Command<B>
impl<B> Unpin for Command<B>where
B: Unpin,
impl<B> UnwindSafe for Command<B>where
B: 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