pub struct EntitySchemaDescription { /* private fields */ }Expand description
EntitySchemaDescription
Stable describe payload for one entity model.
Implementations§
Source§impl EntitySchemaDescription
impl EntitySchemaDescription
Sourcepub const fn new(
entity_path: String,
entity_name: String,
primary_key: String,
primary_key_fields: Vec<String>,
fields: Vec<EntityFieldDescription>,
indexes: Vec<EntityIndexDescription>,
relations: Vec<EntityRelationDescription>,
constraints: Vec<EntityConstraintDescription>,
row_layout_current: u32,
row_layout_history_floor: u32,
) -> Self
pub const fn new( entity_path: String, entity_name: String, primary_key: String, primary_key_fields: Vec<String>, fields: Vec<EntityFieldDescription>, indexes: Vec<EntityIndexDescription>, relations: Vec<EntityRelationDescription>, constraints: Vec<EntityConstraintDescription>, row_layout_current: u32, row_layout_history_floor: u32, ) -> 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 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.
Sourcepub const fn constraints(&self) -> &[EntityConstraintDescription]
pub const fn constraints(&self) -> &[EntityConstraintDescription]
Borrow accepted or generated structural constraint descriptions.
Sourcepub const fn row_layout_current(&self) -> u32
pub const fn row_layout_current(&self) -> u32
Return the current accepted physical row-layout identity.
Sourcepub const fn row_layout_history_floor(&self) -> u32
pub const fn row_layout_history_floor(&self) -> u32
Return the oldest admitted physical row-layout identity.
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
impl Eq for EntitySchemaDescription
Source§impl PartialEq for EntitySchemaDescription
impl PartialEq 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