pub struct ColumnDefinition {
pub name: String,
pub column_type: ColumnType,
pub primary_key: bool,
pub nullable: bool,
pub auto_generate: bool,
pub default_value: Option<String>,
pub references: Option<String>,
pub on_delete: Option<ForeignKeyAction>,
pub unique: bool,
pub validations: Vec<ValidationRule>,
}Fields§
§name: String§column_type: ColumnType§primary_key: bool§nullable: bool§auto_generate: bool§default_value: Option<String>§references: Option<String>Foreign key reference in “table.column” format
on_delete: Option<ForeignKeyAction>Whether to cascade deletes on the FK
unique: boolWhether this column has a unique constraint
validations: Vec<ValidationRule>Validation rules for this column
Trait Implementations§
Source§impl Clone for ColumnDefinition
impl Clone for ColumnDefinition
Source§fn clone(&self) -> ColumnDefinition
fn clone(&self) -> ColumnDefinition
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ColumnDefinition
impl Debug for ColumnDefinition
Source§impl<'de> Deserialize<'de> for ColumnDefinition
impl<'de> Deserialize<'de> for ColumnDefinition
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ColumnDefinition
impl RefUnwindSafe for ColumnDefinition
impl Send for ColumnDefinition
impl Sync for ColumnDefinition
impl Unpin for ColumnDefinition
impl UnsafeUnpin for ColumnDefinition
impl UnwindSafe for ColumnDefinition
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