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: ColumnMetadata
Implementations§
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 duplicate 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 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