tern_cli

Trait ContextOptions

Source
pub trait ContextOptions {
    type Ctx: MigrationContext;

    // Required method
    fn connect(
        &self,
        db_url: &str,
    ) -> impl Future<Output = TernResult<Self::Ctx>>;
}
Expand description

A type that can build a particular context with a database url. This is needed because the context is arbitrary, yet the CLI options have the database URL, which is certainly required to build it.

Required Associated Types§

Required Methods§

Source

fn connect(&self, db_url: &str) -> impl Future<Output = TernResult<Self::Ctx>>

Establish a connection with this context.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§