Skip to main content

DrizzleSQLiteColumn

Trait DrizzleSQLiteColumn 

Source
pub trait DrizzleSQLiteColumn: FromSQLiteValue + Sized {
    const SQL_TYPE: &'static str;

    // Required method
    fn to_sqlite_value(&self) -> SQLiteValue<'static>;
}
Expand description

Marker trait for custom Rust types that map to a SQLite column.

Generated by #[derive(SQLiteEnum)]. The table macro uses this trait to auto-detect enum types without requiring #[column(enum)].

§Associated Constants

  • SQL_TYPE: The SQLite column affinity ("TEXT" or "INTEGER")

§Required Methods

  • to_sqlite_value: Convert self to a SQLiteValue for insertion/updates

Required Associated Constants§

Source

const SQL_TYPE: &'static str

SQLite column affinity: "TEXT" or "INTEGER"

Required Methods§

Source

fn to_sqlite_value(&self) -> SQLiteValue<'static>

Convert self to a SQLiteValue for insertion/updates.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§