Enum bonsaidb_local::cli::StorageCommand
source · 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§
source§impl StorageCommand
impl StorageCommand
sourcepub 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
.
sourcepub fn execute_on(self, storage: &Storage) -> Result<(), Error>
pub fn execute_on(self, storage: &Storage) -> Result<(), Error>
Executes the command on storage
.
sourcepub async fn execute_on_async(self, storage: &AsyncStorage) -> Result<(), Error>
pub async fn execute_on_async(self, storage: &AsyncStorage) -> Result<(), Error>
Executes the command on storage
.
Trait Implementations§
source§impl Debug for StorageCommand
impl Debug for StorageCommand
source§impl FromArgMatches for StorageCommand
impl FromArgMatches for StorageCommand
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<'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 Subcommand for StorageCommand
impl Subcommand for StorageCommand
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 RefUnwindSafe for StorageCommand
impl Send for StorageCommand
impl Sync for StorageCommand
impl Unpin for StorageCommand
impl UnwindSafe for StorageCommand
Blanket Implementations§
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