Column

Trait Column 

Source
pub trait Column {
    type Table: Table;
    type Type;

    const NAME: &'static str;
    const NULLABLE: bool;
    const PRIMARY_KEY: bool;
}
Expand description

Trait for column metadata.

Implemented by column types generated from #[derive(Table)] to provide column-level information and enable type-safe queries.

Required Associated Constants§

Source

const NAME: &'static str

The SQL column name.

Source

const NULLABLE: bool

Whether this column is nullable.

Source

const PRIMARY_KEY: bool

Whether this column is the primary key.

Required Associated Types§

Source

type Table: Table

The table this column belongs to.

Source

type Type

The Rust type of this column.

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§