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>
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 moreAuto Trait Implementations§
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