pub struct Schema { /* private fields */ }Expand description
Validated executable schema. It is never reconstructed from stored data. Clones retain only immutable executable metadata; each database open still validates the current durable manifest independently. Revision reads and writes validate the affected counters when used, without caching them.
Implementations§
Source§impl Schema
impl Schema
Sourcepub fn new(entities: &[&'static EntitySchema]) -> Result<Self, Error>
pub fn new(entities: &[&'static EntitySchema]) -> Result<Self, Error>
Validate one bounded compiled schema and compute its canonical fingerprint.
§Errors
Refuses duplicate/invalid identities, fields, keys, indexes or capacity.
Sourcepub const fn fingerprint(&self) -> [u8; 32]
pub const fn fingerprint(&self) -> [u8; 32]
Full domain-separated contract identity used by the durable manifest.
Sourcepub fn entities(&self) -> &[&'static EntitySchema]
pub fn entities(&self) -> &[&'static EntitySchema]
Compiled entities in logical-name order, for bounded inspection.
Sourcepub fn types(&self) -> impl Iterator<Item = &'static TypeSchema> + '_
pub fn types(&self) -> impl Iterator<Item = &'static TypeSchema> + '_
Reachable named definitions in logical-name order, without expanding cycles.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Schema
impl Freeze for Schema
impl Move for Schema
impl RefUnwindSafe for Schema
impl Send for Schema
impl Sync for Schema
impl Unpin for Schema
impl UnsafeUnpin for Schema
impl UnwindSafe for Schema
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