pub struct Entity { /* private fields */ }Expand description
Entity
Implementations§
Source§impl Entity
impl Entity
pub const fn new( def: Def, store: &'static str, primary_key: PrimaryKey, name: Option<&'static str>, indexes: &'static [Index], fields: FieldList, ty: Type, ) -> Self
pub const fn def(&self) -> &Def
pub const fn store(&self) -> &'static str
pub const fn primary_key(&self) -> &PrimaryKey
pub const fn name(&self) -> Option<&'static str>
pub const fn indexes(&self) -> &'static [Index]
pub const fn fields(&self) -> &FieldList
pub const fn ty(&self) -> &Type
Sourcepub fn get_pk_field(&self) -> Option<&Field>
pub fn get_pk_field(&self) -> Option<&Field>
Return the primary key field if it exists on the entity.
Sourcepub fn resolved_name(&self) -> &'static str
pub fn resolved_name(&self) -> &'static str
Resolve the entity name used for schema identity.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Entity
impl RefUnwindSafe for Entity
impl Send for Entity
impl Sync for Entity
impl Unpin for Entity
impl UnsafeUnpin for Entity
impl UnwindSafe for Entity
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