pub struct EntitySchemaDescription { /* private fields */ }Expand description
EntitySchemaDescription
Stable schema-introspection payload for one runtime entity model.
This mirrors SQL-style DESCRIBE intent for fields, indexes, and relations.
Implementations§
Source§impl EntitySchemaDescription
impl EntitySchemaDescription
Sourcepub const fn new(
entity_path: String,
entity_name: String,
primary_key: String,
fields: Vec<EntityFieldDescription>,
indexes: Vec<EntityIndexDescription>,
relations: Vec<EntityRelationDescription>,
) -> Self
pub const fn new( entity_path: String, entity_name: String, primary_key: String, fields: Vec<EntityFieldDescription>, indexes: Vec<EntityIndexDescription>, relations: Vec<EntityRelationDescription>, ) -> Self
Construct one entity schema description payload.
Sourcepub const fn entity_path(&self) -> &str
pub const fn entity_path(&self) -> &str
Borrow the entity module path.
Sourcepub const fn entity_name(&self) -> &str
pub const fn entity_name(&self) -> &str
Borrow the entity display name.
Sourcepub const fn primary_key(&self) -> &str
pub const fn primary_key(&self) -> &str
Borrow the primary-key field name.
Sourcepub const fn fields(&self) -> &[EntityFieldDescription]
pub const fn fields(&self) -> &[EntityFieldDescription]
Borrow field description entries.
Sourcepub const fn indexes(&self) -> &[EntityIndexDescription]
pub const fn indexes(&self) -> &[EntityIndexDescription]
Borrow index description entries.
Sourcepub const fn relations(&self) -> &[EntityRelationDescription]
pub const fn relations(&self) -> &[EntityRelationDescription]
Borrow relation description entries.
Trait Implementations§
Source§impl CandidType for EntitySchemaDescription
impl CandidType for EntitySchemaDescription
Source§impl Clone for EntitySchemaDescription
impl Clone for EntitySchemaDescription
Source§fn clone(&self) -> EntitySchemaDescription
fn clone(&self) -> EntitySchemaDescription
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 moreSource§impl Debug for EntitySchemaDescription
impl Debug for EntitySchemaDescription
Source§impl<'de> Deserialize<'de> for EntitySchemaDescription
impl<'de> Deserialize<'de> for EntitySchemaDescription
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for EntitySchemaDescription
impl PartialEq for EntitySchemaDescription
Source§impl Serialize for EntitySchemaDescription
impl Serialize for EntitySchemaDescription
impl Eq for EntitySchemaDescription
impl StructuralPartialEq for EntitySchemaDescription
Auto Trait Implementations§
impl Freeze for EntitySchemaDescription
impl RefUnwindSafe for EntitySchemaDescription
impl Send for EntitySchemaDescription
impl Sync for EntitySchemaDescription
impl Unpin for EntitySchemaDescription
impl UnsafeUnpin for EntitySchemaDescription
impl UnwindSafe for EntitySchemaDescription
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