Trait ConnectionInitializer

Source
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§

Source

const NAME: &'static str

Source

const END_VERSION: u32

Required Methods§

Source

fn init(&self, tx: &Transaction<'_>) -> Result<()>

Source

fn upgrade_from(&self, conn: &Transaction<'_>, version: u32) -> Result<()>

Provided Methods§

Source

fn prepare(&self, _conn: &Connection, _db_empty: bool) -> Result<()>

Source

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.

Implementors§