Enum bonsaidb::local::cli::StorageCommand
pub enum StorageCommand {
Backup(Location),
Restore(Location),
Admin(Command),
Schema(Command),
}
Expand description
Commands operating on local database storage.
Variants§
Backup(Location)
Back up the storage.
Restore(Location)
Restore the storage from backup.
Admin(Command)
Executes an admin command.
Schema(Command)
Executes a schema query.
Implementations§
§impl StorageCommand
impl StorageCommand
pub fn execute(self, config: StorageConfiguration) -> Result<(), Error>
pub fn execute(self, config: StorageConfiguration) -> Result<(), Error>
Executes the command after opening a Storage
instance using config
.
pub fn execute_on(self, storage: &Storage) -> Result<(), Error>
pub fn execute_on(self, storage: &Storage) -> Result<(), Error>
Executes the command on storage
.
pub async fn execute_on_async(
self,
storage: &AsyncStorage
) -> impl Future<Output = Result<(), Error>>
pub async fn execute_on_async( self, storage: &AsyncStorage ) -> impl Future<Output = Result<(), Error>>
Executes the command on storage
.
Trait Implementations§
§impl Debug for StorageCommand
impl Debug for StorageCommand
§impl FromArgMatches for StorageCommand
impl FromArgMatches for StorageCommand
§fn from_arg_matches(
__clap_arg_matches: &ArgMatches
) -> Result<StorageCommand, Error<RichFormatter>>
fn from_arg_matches( __clap_arg_matches: &ArgMatches ) -> Result<StorageCommand, Error<RichFormatter>>
§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches
) -> Result<StorageCommand, Error<RichFormatter>>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches ) -> Result<StorageCommand, Error<RichFormatter>>
§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
.§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
.§impl Subcommand for StorageCommand
impl Subcommand for StorageCommand
§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
§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 RefUnwindSafe for StorageCommand
impl Send for StorageCommand
impl Sync for StorageCommand
impl Unpin for StorageCommand
impl UnwindSafe for StorageCommand
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