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 given a database url.

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§