pub struct TableSchema {
pub name: &'static str,
pub columns: Vec<ColumnSchema>,
pub unique_constraints: Vec<Vec<&'static str>>,
pub indexes: Vec<Vec<&'static str>>,
}Expand description
Complete model table metadata used for DDL generation.
Fields§
§name: &'static str§columns: Vec<ColumnSchema>§unique_constraints: Vec<Vec<&'static str>>§indexes: Vec<Vec<&'static str>>Implementations§
Source§impl TableSchema
impl TableSchema
Sourcepub fn validate(&self) -> Result<(), SchemaError>
pub fn validate(&self) -> Result<(), SchemaError>
Validates identifiers, indexes, unique constraints and foreign keys.
Trait Implementations§
Source§impl Clone for TableSchema
impl Clone for TableSchema
Source§fn clone(&self) -> TableSchema
fn clone(&self) -> TableSchema
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 TableSchema
impl Debug for TableSchema
impl Eq for TableSchema
Source§impl PartialEq for TableSchema
impl PartialEq for TableSchema
impl StructuralPartialEq for TableSchema
Auto Trait Implementations§
impl Freeze for TableSchema
impl RefUnwindSafe for TableSchema
impl Send for TableSchema
impl Sync for TableSchema
impl Unpin for TableSchema
impl UnsafeUnpin for TableSchema
impl UnwindSafe for TableSchema
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