pub struct ModelMeta {
pub table: TableMeta,
pub insert_struct: Option<Ident>,
pub extra_derives: Option<Vec<Ident>>,
pub pkey: ColumnMeta,
}
Expand description
Metadata used for IntoArguments, TableMeta, and (subset of) Model
Fields§
§table: TableMeta
§insert_struct: Option<Ident>
§extra_derives: Option<Vec<Ident>>
§pkey: ColumnMeta
Implementations§
Source§impl ModelMeta
impl ModelMeta
pub fn builder_struct(&self) -> Ident
pub fn database_columns_except_pkey( &self, ) -> impl Iterator<Item = &ColumnMeta> + '_
pub fn from_derive(ast: &DeriveInput) -> Self
Methods from Deref<Target = TableMeta>§
pub fn all_fields(&self) -> impl Iterator<Item = &Ident> + '_
pub fn database_columns(&self) -> impl Iterator<Item = &ColumnMeta> + '_
pub fn many_to_one_joins(&self) -> impl Iterator<Item = &ColumnMeta> + '_
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 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