pub struct DeclaredSchema { /* private fields */ }Expand description
A validated normalized graph of direct schema facts.
Implementations§
Source§impl DeclaredSchema
impl DeclaredSchema
Sourcepub fn from_facts(
format: FormatVersion,
required_capabilities: CapabilitySet,
sourced_facts: impl IntoIterator<Item = SourcedSchemaFact>,
) -> Result<Self, SchemaDiagnostics>
pub fn from_facts( format: FormatVersion, required_capabilities: CapabilitySet, sourced_facts: impl IntoIterator<Item = SourcedSchemaFact>, ) -> Result<Self, SchemaDiagnostics>
Validate direct fact ownership, references, and annotation combinations.
Sourcepub const fn format(&self) -> FormatVersion
pub const fn format(&self) -> FormatVersion
Return the schema format version.
Sourcepub const fn required_capabilities(&self) -> &CapabilitySet
pub const fn required_capabilities(&self) -> &CapabilitySet
Return the required open capability set.
Sourcepub fn fact(&self, id: &SchemaFactId) -> Option<&SchemaFact>
pub fn fact(&self, id: &SchemaFactId) -> Option<&SchemaFact>
Return a fact by stable identity.
Sourcepub fn facts(&self) -> impl ExactSizeIterator<Item = &SchemaFact>
pub fn facts(&self) -> impl ExactSizeIterator<Item = &SchemaFact>
Iterate facts in stable identity order.
Sourcepub fn source(&self, id: &SchemaFactId) -> Option<&SourceSpan>
pub fn source(&self, id: &SchemaFactId) -> Option<&SourceSpan>
Return the direct source owner of a fact.
Sourcepub fn canonical_identity_bytes(&self) -> Result<Vec<u8>, Diagnostic>
pub fn canonical_identity_bytes(&self) -> Result<Vec<u8>, Diagnostic>
Return canonical identity bytes with presentation provenance excluded.
Sourcepub const fn declared_identity_fingerprint(
&self,
) -> &DeclaredIdentityFingerprint
pub const fn declared_identity_fingerprint( &self, ) -> &DeclaredIdentityFingerprint
Return the declared identity fingerprint.
Trait Implementations§
Source§impl Clone for DeclaredSchema
impl Clone for DeclaredSchema
Source§impl Debug for DeclaredSchema
impl Debug for DeclaredSchema
impl Eq for DeclaredSchema
Source§impl PartialEq for DeclaredSchema
impl PartialEq for DeclaredSchema
Source§impl Serialize for DeclaredSchema
impl Serialize for DeclaredSchema
impl StructuralPartialEq for DeclaredSchema
Auto Trait Implementations§
impl Freeze for DeclaredSchema
impl RefUnwindSafe for DeclaredSchema
impl Send for DeclaredSchema
impl Sync for DeclaredSchema
impl Unpin for DeclaredSchema
impl UnsafeUnpin for DeclaredSchema
impl UnwindSafe for DeclaredSchema
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