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<()>

Object Safety§

This trait is not object safe.

Implementors§