pub struct FieldState {Show 13 fields
pub name: String,
pub column: String,
pub sql_type: SqlType,
pub nullable: bool,
pub primary_key: bool,
pub auto: bool,
pub unique: bool,
pub index: bool,
pub max_length: Option<u32>,
pub max_digits: Option<u32>,
pub decimal_places: Option<u32>,
pub default: Option<DbDefault>,
pub fk: Option<ForeignKeyState>,
}Expand description
One concrete column.
Fields§
§name: StringRust field name.
column: StringColumn name.
sql_type: SqlTypeColumn type family.
nullable: boolAccepts NULL.
primary_key: boolPart of the primary key.
auto: boolValue generated by the database (autoincrement / identity).
unique: boolUNIQUE.
index: boolSingle-column index.
max_length: Option<u32>VARCHAR(n).
max_digits: Option<u32>Decimal precision.
decimal_places: Option<u32>Decimal scale.
default: Option<DbDefault>Database default.
fk: Option<ForeignKeyState>Foreign-key relation.
Implementations§
Trait Implementations§
Source§impl Clone for FieldState
impl Clone for FieldState
Source§fn clone(&self) -> FieldState
fn clone(&self) -> FieldState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 FieldState
impl Debug for FieldState
Source§impl<'de> Deserialize<'de> for FieldState
impl<'de> Deserialize<'de> for FieldState
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
Source§impl PartialEq for FieldState
impl PartialEq for FieldState
Source§impl Serialize for FieldState
impl Serialize for FieldState
impl StructuralPartialEq for FieldState
Auto Trait Implementations§
impl Freeze for FieldState
impl RefUnwindSafe for FieldState
impl Send for FieldState
impl Sync for FieldState
impl Unpin for FieldState
impl UnsafeUnpin for FieldState
impl UnwindSafe for FieldState
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