pub struct SourceSnapshot { /* private fields */ }Expand description
Immutable identity of one source revision in an evidence session.
Implementations§
Source§impl SourceSnapshot
impl SourceSnapshot
Sourcepub fn try_new(
source: SourceId,
revision: impl Into<Arc<str>>,
fingerprint: impl Into<Arc<str>>,
) -> Result<Self, EvidenceSessionError>
pub fn try_new( source: SourceId, revision: impl Into<Arc<str>>, fingerprint: impl Into<Arc<str>>, ) -> Result<Self, EvidenceSessionError>
Creates an exact source snapshot identity.
Sourcepub fn with_type_system(
self,
type_system: impl Into<Arc<str>>,
) -> Result<Self, EvidenceSessionError>
pub fn with_type_system( self, type_system: impl Into<Arc<str>>, ) -> Result<Self, EvidenceSessionError>
Declares one type system this source’s vocabulary uses.
Package concepts bind to source data only through an external name in a declared type system. A source usually speaks one release-bound system (an IFC4 model: IFC4 entities and its property templates) and may add a project namespace for custom property sets. A source that declares none cannot bind any concept, so package rules over it are not evaluated rather than passed. Declaring a system twice is a no-op.
Sourcepub fn type_systems(&self) -> &[Arc<str>]
pub fn type_systems(&self) -> &[Arc<str>]
Declared type systems for concept binding, sorted and unique.
Sourcepub fn with_schema(
self,
schema: impl Into<Arc<str>>,
) -> Result<Self, EvidenceSessionError>
pub fn with_schema( self, schema: impl Into<Arc<str>>, ) -> Result<Self, EvidenceSessionError>
Binds a source-declared semantic schema to the immutable snapshot.
Sourcepub fn fingerprint(&self) -> &str
pub fn fingerprint(&self) -> &str
Content fingerprint, including its algorithm when applicable.