pub trait SQLColumnInfo: Send + Sync {
// Required methods
fn is_not_null(&self) -> bool;
fn is_primary_key(&self) -> bool;
fn is_unique(&self) -> bool;
fn name(&self) -> &'static str;
fn type(&self) -> &'static str;
fn has_default(&self) -> bool;
fn table(&self) -> &'static dyn SQLTableInfo;
}Expand description
Runtime metadata of a column, usable as a trait object.
Generated by the table macros for each column.
Required Methods§
Sourcefn is_not_null(&self) -> bool
fn is_not_null(&self) -> bool
Whether the column is NOT NULL.
Sourcefn is_primary_key(&self) -> bool
fn is_primary_key(&self) -> bool
Whether the column is part of the primary key.
Sourcefn has_default(&self) -> bool
fn has_default(&self) -> bool
Whether the column has a default value.
Sourcefn table(&self) -> &'static dyn SQLTableInfo
fn table(&self) -> &'static dyn SQLTableInfo
The table the column belongs to.
Trait Implementations§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".