pub struct ModelMeta {
pub name: &'static str,
pub table: &'static str,
pub fields: &'static [FieldMeta],
pub many_to_many: &'static [ManyToManyMeta],
pub ordering: &'static [(&'static str, OrderDirection)],
pub indexes: &'static [IndexMeta],
pub constraints: &'static [ConstraintMeta],
pub managed: bool,
}Expand description
Static metadata of a model (Django Meta plus the field list).
Fields§
§name: &'static strRust type name (User); also the migration model name.
table: &'static strTable name.
fields: &'static [FieldMeta]Concrete columns in declaration order.
many_to_many: &'static [ManyToManyMeta]Many-to-many relations (not columns).
ordering: &'static [(&'static str, OrderDirection)]Default ordering as (column, direction).
indexes: &'static [IndexMeta]Named indexes.
constraints: &'static [ConstraintMeta]Table constraints.
managed: boolWhether migrations manage this table (false for unmanaged tables/views).
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ModelMeta
impl RefUnwindSafe for ModelMeta
impl Send for ModelMeta
impl Sync for ModelMeta
impl Unpin for ModelMeta
impl UnsafeUnpin for ModelMeta
impl UnwindSafe for ModelMeta
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