Struct PackagedModelDocument
pub struct PackagedModelDocument { /* private fields */ }Description
One admitted canonical model plus exact package compilation provenance.
Implementations§
§impl PackagedModelDocument
impl PackagedModelDocument
pub fn compile_locked(
store: &impl PackageStore,
resolution: &ResolutionRecordV1,
entry_model: &str,
) -> Result<PackagedModelDocument, PackageCompilationError>
pub fn compile_locked( store: &impl PackageStore, resolution: &ResolutionRecordV1, entry_model: &str, ) -> Result<PackagedModelDocument, PackageCompilationError>
Resolve a locked package graph offline, verify source semantics, and compile one package-local Model from the exact root.
Resolution has no discovery, version selection, network, environment, or fallback path. Every source unit is analyzed and compared with its release’s canonical semantic content before the selected root is elaborated or any graph transaction is committed.
§Errors
Returns the original resolver error, package contract error, complete compiler diagnostic set, or a typed semantic-content mismatch.
pub const fn model(&self) -> &ModelDocument
pub const fn model(&self) -> &ModelDocument
Canonical model admitted through the ordinary application boundary.
pub const fn compilation(&self) -> &PackageCompilationRecordV1
pub const fn compilation(&self) -> &PackageCompilationRecordV1
Exact resolution, package inventory, toolchain, and model digest.
pub const fn provenance(&self) -> &ProvenanceMap
pub const fn provenance(&self) -> &ProvenanceMap
Package-qualified definition, instance, and binding source locations.
pub const fn physical_exposure_catalog(
&self,
) -> Option<&PhysicalExposureCatalogEnvelopeV1>
pub const fn physical_exposure_catalog( &self, ) -> Option<&PhysicalExposureCatalogEnvelopeV1>
Versioned, content-addressed observation cuts for every ownerless public physical Port eliminated during exact package compilation.
pub fn validate_physical_exposure_catalog(
&self,
catalog: &PhysicalExposureCatalogEnvelopeV1,
resolution: &ResolutionRecordV1,
) -> Result<(), PackageCompilationError>
pub fn validate_physical_exposure_catalog( &self, catalog: &PhysicalExposureCatalogEnvelopeV1, resolution: &ResolutionRecordV1, ) -> Result<(), PackageCompilationError>
Independently replay a decoded physical exposure catalog against the exact package compilation and compiler-derived occurrence cuts.
A flat Kernel graph alone cannot reconstruct which proper subset came from an eliminated hierarchy occurrence. Replay therefore checks the resolution and recompilation-owned sidecars, not only graph membership.
§Errors
Returns a typed resolution/package failure or EQ0901 diagnostic for
any stale Model, source lineage, occurrence cut, contract, or source
provenance.
pub fn bind_physical_observation_v1(
&self,
projection: ArtifactDigest,
quantity: PhysicalExposureQuantityV1,
run: &RunManifestV1,
result: ArtifactDigest,
) -> Result<PhysicalExposureObservationBindingV1, PackageRunBindingError>
pub fn bind_physical_observation_v1( &self, projection: ArtifactDigest, quantity: PhysicalExposureQuantityV1, run: &RunManifestV1, result: ArtifactDigest, ) -> Result<PhysicalExposureObservationBindingV1, PackageRunBindingError>
Bind one cataloged physical exposure quantity to an output of an exact package-linked Run v1.
This is a value-free lineage operation. The output artifact must already be listed by the Run; numerical acceptance and payload typing remain the responsibility of the producing result adapter.
§Errors
Returns a typed package/Run linkage or artifact failure for a missing catalog, projection, exact Model/revision mismatch, or absent output.
pub fn validate_physical_observation_v1(
&self,
binding: &PhysicalExposureObservationBindingV1,
run: &RunManifestV1,
resolution: &ResolutionRecordV1,
) -> Result<(), PackageRunBindingError>
pub fn validate_physical_observation_v1( &self, binding: &PhysicalExposureObservationBindingV1, run: &RunManifestV1, resolution: &ResolutionRecordV1, ) -> Result<(), PackageRunBindingError>
Independently replay one physical observation binding against the exact package resolution, sealed catalog, Run, and registered output.
§Errors
Returns a typed package/Run linkage or artifact failure for any stale source lineage, catalog, projection, Run, or output identity.
pub fn bind_run_v1(
&self,
run: &RunManifestV1,
) -> Result<PackageRunBindingV1, PackageRunBindingError>
pub fn bind_run_v1( &self, run: &RunManifestV1, ) -> Result<PackageRunBindingV1, PackageRunBindingError>
Bind one caller-designated v1 Run manifest to this exact package compilation identity.
The Run must reference the admitted Model exactly. This constructs a content-addressed lineage edge; it does not prove that an execution occurred or that the caller accepted it. Evidence producers should invoke it only after their independent acceptance checks succeed.
§Errors
Returns a typed artifact, package-contract, or Model-linkage failure.
pub fn validate_run_v1_binding(
&self,
binding: &PackageRunBindingV1,
run: &RunManifestV1,
resolution: &ResolutionRecordV1,
) -> Result<(), PackageRunBindingError>
pub fn validate_run_v1_binding( &self, binding: &PackageRunBindingV1, run: &RunManifestV1, resolution: &ResolutionRecordV1, ) -> Result<(), PackageRunBindingError>
Independently replay an exact v1 Run lineage edge.
This revalidates the complete resolution record against the package compilation, the admitted Model against the compilation, and the Run’s Model and canonical digest against the binding.
§Errors
Returns a typed artifact, package-contract, or Model-linkage failure.
pub fn bind_execution_v2(
&self,
realization: &RealizationEnvelopeV1,
run: &RunManifestV2,
) -> Result<PackageExecutionBindingV1, PackageExecutionBindingError>
pub fn bind_execution_v2( &self, realization: &RealizationEnvelopeV1, run: &RunManifestV2, ) -> Result<PackageExecutionBindingV1, PackageExecutionBindingError>
Bind one typed Realization and its validated Run v2 to this exact package compilation.
This method validates the complete Model/revision/Realization/Run chain before constructing a separate content-addressed lineage edge. The edge changes none of the linked artifacts and does not independently prove execution or numerical acceptance.
§Errors
Returns a typed artifact, package-contract, or exact-linkage failure.
pub fn validate_execution_v2_binding(
&self,
binding: &PackageExecutionBindingV1,
realization: &RealizationEnvelopeV1,
run: &RunManifestV2,
resolution: &ResolutionRecordV1,
) -> Result<(), PackageExecutionBindingError>
pub fn validate_execution_v2_binding( &self, binding: &PackageExecutionBindingV1, realization: &RealizationEnvelopeV1, run: &RunManifestV2, resolution: &ResolutionRecordV1, ) -> Result<(), PackageExecutionBindingError>
Independently replay exact package execution lineage against all concrete artifacts.
Resolution and compilation inventory are replayed first. The admitted Model, typed Realization, and Run v2 are then revalidated before their exact identities are compared with the lineage edge.
§Errors
Returns a typed artifact, package-contract, or exact-linkage failure.
pub fn into_model(self) -> ModelDocument
pub fn into_model(self) -> ModelDocument
Transfer the canonical model while deliberately discarding its package compilation and source-provenance sidecars.
Trait Implementations§
§impl Clone for PackagedModelDocument
impl Clone for PackagedModelDocument
§impl Debug for PackagedModelDocument
impl Debug for PackagedModelDocument
§impl PartialEq for PackagedModelDocument
impl PartialEq for PackagedModelDocument
§fn eq(&self, other: &PackagedModelDocument) -> bool
fn eq(&self, other: &PackagedModelDocument) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for PackagedModelDocument
Auto Trait Implementations§
impl Freeze for PackagedModelDocument
impl RefUnwindSafe for PackagedModelDocument
impl Send for PackagedModelDocument
impl Sync for PackagedModelDocument
impl Unpin for PackagedModelDocument
impl UnsafeUnpin for PackagedModelDocument
impl UnwindSafe for PackagedModelDocument
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.