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§
type Ctx: MigrationContext
Required Methods§
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.