pub struct EntitySchemaDescription { /* private fields */ }Expand description
EntitySchemaDescription
Stable describe payload for one entity model.
Implementations§
Source§impl EntitySchemaDescription
impl EntitySchemaDescription
Sourcepub fn new(
entity_path: String,
entity_name: String,
primary_key: String,
fields: Vec<EntityFieldDescription>,
indexes: Vec<EntityIndexDescription>,
relations: Vec<EntityRelationDescription>,
) -> Self
pub fn new( entity_path: String, entity_name: String, primary_key: String, fields: Vec<EntityFieldDescription>, indexes: Vec<EntityIndexDescription>, relations: Vec<EntityRelationDescription>, ) -> Self
Construct one scalar-compatible entity schema description payload.
Sourcepub const fn new_with_primary_key_fields(
entity_path: String,
entity_name: String,
primary_key: String,
primary_key_fields: Vec<String>,
fields: Vec<EntityFieldDescription>,
indexes: Vec<EntityIndexDescription>,
relations: Vec<EntityRelationDescription>,
) -> Self
pub const fn new_with_primary_key_fields( entity_path: String, entity_name: String, primary_key: String, primary_key_fields: Vec<String>, fields: Vec<EntityFieldDescription>, indexes: Vec<EntityIndexDescription>, relations: Vec<EntityRelationDescription>, ) -> Self
Construct one entity schema description payload with ordered primary-key fields.
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 rendered primary-key field list.
Sourcepub const fn primary_key_fields(&self) -> &[String]
pub const fn primary_key_fields(&self) -> &[String]
Borrow ordered primary-key field names.
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 (const: unstable) · 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§fn eq(&self, other: &EntitySchemaDescription) -> bool
fn eq(&self, other: &EntitySchemaDescription) -> bool
Tests for
self and other values to be equal, and is used by ==.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