pub struct ColumnDef {
pub name: &'static str,
pub data_type: DataTypeKind,
pub nullable: bool,
pub primary_key: bool,
pub foreign_key: Option<ForeignKeyDef>,
}Expand description
Defines a column in a database table.
Fields§
§name: &'static strThe name of the column.
data_type: DataTypeKindThe data type of the column.
nullable: boolIndicates if this column can contain NULL values.
primary_key: boolIndicates if this column is part of the primary key.
foreign_key: Option<ForeignKeyDef>Foreign key definition, if any.
Trait Implementations§
impl Copy for ColumnDef
impl Eq for ColumnDef
impl StructuralPartialEq for ColumnDef
Auto Trait Implementations§
impl Freeze for ColumnDef
impl RefUnwindSafe for ColumnDef
impl Send for ColumnDef
impl Sync for ColumnDef
impl Unpin for ColumnDef
impl UnwindSafe for ColumnDef
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more