Skip to main content

PredictionContractError

Enum PredictionContractError 

Source
#[non_exhaustive]
pub enum PredictionContractError {
Show 45 variants InvalidEngineContract(EngineContractError), InvalidDependencyClosure(String), TextTooLong { field: &'static str, bytes: usize, limit: usize, }, InvalidToken { field: &'static str, value: String, }, NonFiniteNumber, InvalidMeasurementPointer(String), MeasurementPointerMissing(String), MeasurementPointerNotScalar(String), MeasurementValueMismatch(String), TooManyMeasurementPointerComponents { components: usize, limit: usize, }, RawSourceDomainKeyMismatch, RawSourceRowNotFound, RawSourceFieldUnavailable(String), RawSourceValueMismatch, TooManyBasisReferences { found: usize, limit: usize, }, DuplicateBasisReference, AvailableBasisEmpty, AvailableHasReasons, RequiredUnavailableWithoutReason, DuplicateUnavailableReason(String), InvalidUnavailableReasonCode(String), TooManyUnavailableReasons { found: usize, limit: usize, }, EmptyFacetList, TooManyFacets { found: usize, limit: usize, }, DuplicateFacetScope, SourceFormatMismatch, SourceFormatNotAccepted, PrimaryInputMismatch, DependencyClosureCoverageMismatch, ProvenanceIdentityMismatch, UnknownProfileFact(String), UnknownResolvedSetting(String), UnknownPrimarySource(String), AvailableScopeNotEvaluatedExactlyOnce, UnavailableScopeEvaluated, UnavailableScopeDuplicatedAsGap, FindingMissingPredictionScope, FindingScopeNotAvailable, IdentityMismatch { contract: &'static str, }, InvalidSchema { field: &'static str, expected: &'static str, found: String, }, NonCanonicalOrder(&'static str), InvalidConsumedContracts, TooMuchRetainedText { found: usize, limit: usize, }, TooManyAggregateProvenanceRows { found: usize, limit: usize, }, ArithmeticOverflow(&'static str),
}
Expand description

A prediction/provenance value violated the immutable V1 contract.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

InvalidEngineContract(EngineContractError)

An embedded profile or settings value was invalid.

§

InvalidDependencyClosure(String)

An embedded dependency-closure wire was structurally valid but violated its immutable semantic contract.

§

TextTooLong

A retained string exceeded its per-value bound.

Fields

§field: &'static str

Semantic field being retained.

§bytes: usize

Actual UTF-8 byte count.

§limit: usize

Contract limit.

§

InvalidToken

A stable token was empty, contained controls, or used invalid syntax.

Fields

§field: &'static str

Semantic token field.

§value: String

Rejected spelling.

§

NonFiniteNumber

A finite-number scalar contained NaN or infinity.

§

InvalidMeasurementPointer(String)

A measurement pointer was not a canonical measurements-root RFC 6901 pointer.

§

MeasurementPointerMissing(String)

A measurement pointer did not resolve in the validated contract.

§

MeasurementPointerNotScalar(String)

A measurement pointer resolved to an object or array rather than a scalar.

§

MeasurementValueMismatch(String)

A measurement pointer’s retained scalar disagreed with the validated contract.

§

TooManyMeasurementPointerComponents

A measurement pointer exceeded its component bound.

Fields

§components: usize

Decoded component count.

§limit: usize

Contract limit.

§

RawSourceDomainKeyMismatch

A raw-source domain and stable key identify different row kinds.

§

RawSourceRowNotFound

The stable raw-source row key was absent from the same-load facts.

§

RawSourceFieldUnavailable(String)

The field id does not name a scalar on the selected raw-source row.

§

RawSourceValueMismatch

The retained raw-source scalar disagrees with same-load facts.

§

TooManyBasisReferences

One facet exceeded the per-facet basis-reference bound.

Fields

§found: usize

Supplied reference count.

§limit: usize

Contract limit.

§

DuplicateBasisReference

Canonical basis rows contained an exact duplicate.

§

AvailableBasisEmpty

An available facet had no evidence basis.

§

AvailableHasReasons

An available facet carried an unavailable reason.

§

RequiredUnavailableWithoutReason

A required-unavailable facet carried no stable reason.

§

DuplicateUnavailableReason(String)

A reason list contained an exact duplicate.

§

InvalidUnavailableReasonCode(String)

A custom reason code was not a bounded namespaced ASCII code.

§

TooManyUnavailableReasons

One facet exceeded the unavailable-reason bound.

Fields

§found: usize

Supplied reason count.

§limit: usize

Contract limit.

§

EmptyFacetList

An engine prediction did not contain any facets.

§

TooManyFacets

One engine prediction exceeded the facet bound.

Fields

§found: usize

Supplied facet count.

§limit: usize

Contract limit.

§

DuplicateFacetScope

Canonical facets reused a scope.

§

SourceFormatMismatch

The profile, raw-source binding, and header source formats disagreed.

§

SourceFormatNotAccepted

The resolved profile does not accept the same-load source format.

§

PrimaryInputMismatch

Raw-source and dependency-closure primary identities disagreed.

§

DependencyClosureCoverageMismatch

Raw resource coverage and the same-load dependency closure disagreed.

§

ProvenanceIdentityMismatch

A prediction refers to a different file provenance identity.

§

UnknownProfileFact(String)

A basis profile-fact id is absent from the embedded profile.

§

UnknownResolvedSetting(String)

A basis setting location/id is absent or contradicts the profile descriptor.

§

UnknownPrimarySource(String)

A basis primary-source id is absent from the embedded profile.

§

AvailableScopeNotEvaluatedExactlyOnce

An available facet scope was absent or duplicated in completed scopes.

§

UnavailableScopeEvaluated

A required-unavailable facet scope was also reported as completed.

§

UnavailableScopeDuplicatedAsGap

A required-unavailable facet was duplicated as an ordinary coverage gap.

§

FindingMissingPredictionScope

A prediction-bearing finding lacked its required facet binding.

§

FindingScopeNotAvailable

A finding scope did not name exactly one available facet.

§

IdentityMismatch

A canonical identity did not match its recomputed preimage.

Fields

§contract: &'static str

Contract whose identity was rejected.

§

InvalidSchema

A schema field did not carry its immutable V1 identity.

Fields

§field: &'static str

Field carrying the schema id.

§expected: &'static str

Required identity.

§found: String

Supplied identity.

§

NonCanonicalOrder(&'static str)

A canonical ordered collection was supplied out of order.

§

InvalidConsumedContracts

The exact derived consumed-contract inventory was changed.

§

TooMuchRetainedText

Aggregate retained text exceeded its file bound.

Fields

§found: usize

Observed retained text.

§limit: usize

Contract limit.

§

TooManyAggregateProvenanceRows

Aggregate embedded profile, settings, and raw-source rows exceeded the file bound.

Fields

§found: usize

Observed aggregate retained row count.

§limit: usize

Immutable V1 row limit.

§

ArithmeticOverflow(&'static str)

Checked accounting overflowed.

Trait Implementations§

Source§

impl Clone for PredictionContractError

Source§

fn clone(&self) -> PredictionContractError

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for PredictionContractError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for PredictionContractError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for PredictionContractError

Source§

impl Error for PredictionContractError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<EngineContractError> for PredictionContractError

Source§

fn from(source: EngineContractError) -> Self

Converts to this type from the input type.
Source§

impl From<PredictionContractError> for OutputContractError

Source§

fn from(source: PredictionContractError) -> Self

Converts to this type from the input type.
Source§

impl From<PredictionContractError> for EvaluationError

Source§

fn from(source: PredictionContractError) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for PredictionContractError

Source§

fn eq(&self, other: &PredictionContractError) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for PredictionContractError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.