pub struct EntityModel { /* private fields */ }Expand description
EntityModel
Macro-generated runtime schema snapshot for a single entity. The planner and predicate validator consume this model directly.
Implementations§
Source§impl EntityModel
impl EntityModel
Sourcepub const fn new(
path: &'static str,
entity_name: &'static str,
primary_key: &'static FieldModel,
fields: &'static [FieldModel],
indexes: &'static [&'static IndexModel],
) -> Self
pub const fn new( path: &'static str, entity_name: &'static str, primary_key: &'static FieldModel, fields: &'static [FieldModel], indexes: &'static [&'static IndexModel], ) -> Self
Build one runtime entity schema descriptor.
Sourcepub const fn entity_name(&self) -> &'static str
pub const fn entity_name(&self) -> &'static str
Return the stable external entity name.
Sourcepub const fn primary_key(&self) -> &'static FieldModel
pub const fn primary_key(&self) -> &'static FieldModel
Return the primary-key field descriptor.
Sourcepub const fn fields(&self) -> &'static [FieldModel]
pub const fn fields(&self) -> &'static [FieldModel]
Return the ordered runtime field descriptors.
Sourcepub const fn indexes(&self) -> &'static [&'static IndexModel]
pub const fn indexes(&self) -> &'static [&'static IndexModel]
Return the runtime index descriptors.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EntityModel
impl RefUnwindSafe for EntityModel
impl Send for EntityModel
impl Sync for EntityModel
impl Unpin for EntityModel
impl UnsafeUnpin for EntityModel
impl UnwindSafe for EntityModel
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