Trait bonsaidb::cli::CommandLine[][src]

pub trait CommandLine: Sized + Send + Sync {
    type Backend: Backend;
    type Subcommand: Subcommand + Send + Sync + Debug;
    fn configuration<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Result<ServerConfiguration<Self::Backend>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
fn execute<'life0, 'async_trait>(
        &'life0 mut self,
        command: Self::Subcommand,
        connection: AnyServerConnection<Self::Backend>
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; fn run<'async_trait>(
        self
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        Self: 'async_trait
, { ... }
fn run_from<'async_trait, I, T>(
        self,
        itr: I
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        I: IntoIterator<Item = T> + Send,
        T: Into<OsString> + Clone + Send,
        I: 'async_trait,
        T: 'async_trait,
        Self: 'async_trait
, { ... }
fn open_server<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Result<CustomServer<Self::Backend>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
, { ... } }
Expand description

A command line interface that can be executed with either a remote or local connection to a server.

Associated Types

The Backend for this command line.

The [Subcommand] which is embedded next to the built-in BonsaiDb commands.

Required methods

Returns the server configuration to use when initializing a local server.

Execute the command on connection.

Provided methods

Runs the command-line interface using command-line arguments from the environment.

Runs the command-line interface using the specified list of arguments.

Returns a new server initialized based on the same configuration used for CommandLine.

Implementors