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>
) -> impl Future<Output = Result<(), BackendError<<B as Backend>::Error>>>
pub async fn execute( self, configuration: ServerConfiguration<B> ) -> impl Future<Output = Result<(), BackendError<<B as Backend>::Error>>>
Executes the command.
sourcepub async fn execute_on(
self,
server: CustomServer<B>
) -> impl Future<Output = Result<(), BackendError<<B as Backend>::Error>>>
pub async fn execute_on( self, server: CustomServer<B> ) -> impl Future<Output = 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<RichFormatter>>
fn from_arg_matches( __clap_arg_matches: &ArgMatches ) -> Result<Command<B>, Error<RichFormatter>>
source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches
) -> Result<Command<B>, Error<RichFormatter>>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches ) -> Result<Command<B>, Error<RichFormatter>>
source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches
) -> Result<(), Error<RichFormatter>>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches ) -> Result<(), Error<RichFormatter>>
Assign values from
ArgMatches
to self
.source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches
) -> Result<(), Error<RichFormatter>>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches ) -> Result<(), Error<RichFormatter>>
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 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.
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