pub trait ConnectionInitializer {
const NAME: &'static str;
const END_VERSION: u32;
// Required methods
fn init(&self, tx: &Transaction<'_>) -> Result<()>;
fn upgrade_from(&self, conn: &Transaction<'_>, version: u32) -> Result<()>;
// Provided methods
fn prepare(&self, _conn: &Connection, _db_empty: bool) -> Result<()> { ... }
fn finish(&self, _conn: &Connection) -> Result<()> { ... }
}
Required Associated Constants§
Required Methods§
fn init(&self, tx: &Transaction<'_>) -> Result<()>
fn upgrade_from(&self, conn: &Transaction<'_>, version: u32) -> Result<()>
Provided Methods§
fn prepare(&self, _conn: &Connection, _db_empty: bool) -> Result<()>
fn finish(&self, _conn: &Connection) -> Result<()>
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.