Struct ormlite_attr::ModelMetadata
source · pub struct ModelMetadata {
pub inner: TableMetadata,
pub insert_struct: Option<String>,
pub pkey: ColumnMetadata,
}Expand description
Metadata used for IntoArguments, TableMeta, and (subset of) Model
Fields§
§inner: TableMetadata§insert_struct: Option<String>§pkey: ColumnMetadataImplementations§
source§impl ModelMetadata
impl ModelMetadata
pub fn new(name: &str, columns: Vec<ColumnMetadata>) -> Self
pub fn table(&self) -> &str
pub fn struct_name(&self) -> &Ident
pub fn builder_struct(&self) -> Ident
pub fn database_columns_except_pkey( &self, ) -> impl Iterator<Item = &ColumnMetadata> + '_
pub fn database_columns(&self) -> impl Iterator<Item = &ColumnMetadata> + '_
pub fn many_to_one_joins(&self) -> impl Iterator<Item = &ColumnMetadata> + '_
pub fn columns(&self) -> impl Iterator<Item = &ColumnMetadata> + '_
pub fn from_derive(ast: &DeriveInput) -> Result<Self, SyndecodeError>
Methods from Deref<Target = TableMetadata>§
pub fn all_fields(&self) -> impl Iterator<Item = &Ident> + '_
pub fn database_columns(&self) -> impl Iterator<Item = &ColumnMetadata> + '_
pub fn many_to_one_joins(&self) -> impl Iterator<Item = &ColumnMetadata> + '_
Trait Implementations§
source§impl Clone for ModelMetadata
impl Clone for ModelMetadata
source§fn clone(&self) -> ModelMetadata
fn clone(&self) -> ModelMetadata
Returns a copy 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 ModelMetadata
impl Debug for ModelMetadata
Auto Trait Implementations§
impl Freeze for ModelMetadata
impl RefUnwindSafe for ModelMetadata
impl Send for ModelMetadata
impl Sync for ModelMetadata
impl Unpin for ModelMetadata
impl UnwindSafe for ModelMetadata
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)