Struct ModelEnvelope
pub struct ModelEnvelope { /* private fields */ }Description
Canonical serialization of the single current Semantic Model contract.
Implementations§
§impl ModelEnvelope
impl ModelEnvelope
pub fn from_program(
program: &KernelProgram,
) -> Result<ModelEnvelope, Diagnostic>
pub fn from_program( program: &KernelProgram, ) -> Result<ModelEnvelope, Diagnostic>
Encode one immutable validated Semantic Kernel program.
§Errors
Returns EQ0901 for an unsupported kernel value or resource-limit
violation.
pub fn from_json(
bytes: &[u8],
limits: ModelDecoderLimits,
) -> Result<ModelEnvelope, Diagnostic>
pub fn from_json( bytes: &[u8], limits: ModelDecoderLimits, ) -> Result<ModelEnvelope, Diagnostic>
Decode and validate current bytes without mutating a graph store.
§Errors
Returns EQ0901 for malformed, oversized, dangling, duplicated, or
wrong-version data.
pub fn canonical_json(&self) -> Result<Vec<u8>, Diagnostic>
pub fn canonical_json(&self) -> Result<Vec<u8>, Diagnostic>
pub fn digest(&self) -> Result<ArtifactDigest, Diagnostic>
pub fn digest(&self) -> Result<ArtifactDigest, Diagnostic>
Domain-separated SHA-256 identity of current semantic content.
Source revision is provenance and is excluded from content identity.
§Errors
Returns EQ0901 if serialization unexpectedly fails.
pub fn to_transaction(
&self,
) -> Result<(Transaction, OntologyId<Model>), Vec<Diagnostic>>
pub fn to_transaction( &self, ) -> Result<(Transaction, OntologyId<Model>), Vec<Diagnostic>>
Reconstruct one typed transaction without committing it.
§Errors
Returns structured diagnostics if validated wire data cannot be represented by the closed Semantic Model transaction vocabulary.
pub fn to_program(&self) -> Result<KernelProgram, Vec<Diagnostic>>
pub fn to_program(&self) -> Result<KernelProgram, Vec<Diagnostic>>
Reconstruct through typed definitions, an atomic commit, and complete
KernelProgram validation.
§Errors
Returns diagnostics from reconstruction, commit, or whole-model validation; no partial state is exposed.
pub const fn source_revision(&self) -> u64
pub const fn source_revision(&self) -> u64
Source graph revision retained as provenance.
pub fn model(&self) -> Result<OntologyId<Model>, Diagnostic>
pub fn model(&self) -> Result<OntologyId<Model>, Diagnostic>
Typed Semantic Model identity.
§Errors
Returns EQ0901 only if validated internal state were corrupted.
pub fn requires_geometry_admission(&self) -> Result<bool, Diagnostic>
pub fn requires_geometry_admission(&self) -> Result<bool, Diagnostic>
Whether whole-program admission requires an external geometry bundle.
This is derived from the typed current Model definitions, not from a failed semantic replay or its human-readable diagnostics. Callers may retain such an artifact before the exact geometry closure is available, but must not treat this predicate as semantic admission.
§Errors
Returns EQ0901 only if validated internal wire state cannot be decoded.
Trait Implementations§
§impl CanonicalModelArtifact for ModelEnvelope
impl CanonicalModelArtifact for ModelEnvelope
§fn artifact_reference(&self) -> Result<ModelArtifactReference, Diagnostic>
fn artifact_reference(&self) -> Result<ModelArtifactReference, Diagnostic>
§impl Clone for ModelEnvelope
impl Clone for ModelEnvelope
§impl Debug for ModelEnvelope
impl Debug for ModelEnvelope
§impl PartialEq for ModelEnvelope
impl PartialEq for ModelEnvelope
§fn eq(&self, other: &ModelEnvelope) -> bool
fn eq(&self, other: &ModelEnvelope) -> bool
self and other values to be equal, and is used by ==.§impl ReplayableCanonicalModelArtifact for ModelEnvelope
impl ReplayableCanonicalModelArtifact for ModelEnvelope
§fn replay_model(&self) -> Result<ReplayedCanonicalModel, Diagnostic>
fn replay_model(&self) -> Result<ReplayedCanonicalModel, Diagnostic>
impl StructuralPartialEq for ModelEnvelope
Auto Trait Implementations§
impl Freeze for ModelEnvelope
impl RefUnwindSafe for ModelEnvelope
impl Send for ModelEnvelope
impl Sync for ModelEnvelope
impl Unpin for ModelEnvelope
impl UnsafeUnpin for ModelEnvelope
impl UnwindSafe for ModelEnvelope
Blanket Implementations§
Source§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
§type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Source§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
§fn approx(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
§impl<T> ConvUtil for T
impl<T> ConvUtil for T
§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
§fn into_as<Dst>(self) -> Dstwhere
Self: Sized + Into<Dst>,
fn into_as<Dst>(self) -> Dstwhere
Self: Sized + Into<Dst>,
§fn try_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + TryInto<Dst>,
fn try_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + TryInto<Dst>,
§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> Twhere
Self: Distribution<T>,
Source§impl<T> From<T> for T
impl<T> From<T> for T
Source§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere
U: From<T>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>where
F: FnOnce(&Self) -> bool,
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>where
F: FnOnce(&Self) -> bool,
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> Same for T
impl<T> Same for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.