Skip to main content

EngineContractError

Enum EngineContractError 

Source
#[non_exhaustive]
pub enum EngineContractError {
Show 25 variants InvalidSchema { field: &'static str, expected: &'static str, found: String, }, EmptyText { field: &'static str, }, TextTooLong { field: &'static str, found: usize, max: usize, }, TooManyRows { field: &'static str, found: usize, max: usize, }, TooManyAggregateRows { found: usize, max: usize, }, TooMuchAggregateText { found: usize, max: usize, }, ArithmeticOverflow { field: &'static str, }, DuplicateKey { field: &'static str, key: String, }, NonCanonicalOrder { field: &'static str, }, InvalidFactInventory, InvalidFactValue { fact: EngineFactIdV1, }, InvalidAcceptedInputs, InvalidDescriptorDefault { setting: EngineSettingIdV1, }, UnknownSourceFact { source_id: String, fact: EngineFactIdV1, }, SourceReferencesNonKnownFact { source_id: String, fact: EngineFactIdV1, }, UnknownSourceSetting { source_id: String, setting: EngineSettingIdV1, }, UnreferencedKnownFact { fact: EngineFactIdV1, }, UnreferencedSetting { setting: EngineSettingIdV1, }, InvalidSourceTransformPath { reason: &'static str, }, UnknownMaterializedSetting { location: String, setting: EngineSettingIdV1, }, WrongSettingScope { location: String, setting: EngineSettingIdV1, }, NonApplicableSetting { location: String, setting: EngineSettingIdV1, }, WrongSettingDomain { location: String, setting: EngineSettingIdV1, }, MissingRequiredSetting { location: String, setting: EngineSettingIdV1, }, IdentityMismatch { contract: &'static str, },
}
Expand description

Typed violation of the core-owned profile/settings 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.
§

InvalidSchema

A contract schema id did not match its immutable V1 value.

Fields

§field: &'static str

Field carrying the invalid schema id.

§expected: &'static str

Required immutable schema id.

§found: String

Supplied schema id.

§

EmptyText

A required retained string was empty.

Fields

§field: &'static str

Invalid field.

§

TextTooLong

One retained string exceeded the per-value byte limit.

Fields

§field: &'static str

Oversized field.

§found: usize

Observed UTF-8 byte count.

§max: usize

Maximum permitted byte count.

§

TooManyRows

One collection exceeded the V1 row limit.

Fields

§field: &'static str

Oversized collection.

§found: usize

Observed row count.

§max: usize

Maximum permitted row count.

§

TooManyAggregateRows

Aggregate profile/settings rows exceeded the V1 limit.

Fields

§found: usize

Observed aggregate row count.

§max: usize

Maximum permitted aggregate row count.

§

TooMuchAggregateText

Aggregate retained UTF-8 text exceeded the V1 limit.

Fields

§found: usize

Observed aggregate UTF-8 byte count.

§max: usize

Maximum permitted aggregate byte count.

§

ArithmeticOverflow

Checked arithmetic overflowed while accounting bounded work.

Fields

§field: &'static str

Counter that overflowed.

§

DuplicateKey

A set/map-shaped collection contains a duplicate stable key.

Fields

§field: &'static str

Collection containing the duplicate.

§key: String

Duplicate stable key.

§

NonCanonicalOrder

A canonical collection is not in its required order.

Fields

§field: &'static str

Unordered collection.

§

InvalidFactInventory

The complete closed fact-id inventory is absent or malformed.

§

InvalidFactValue

A known fact carries a value from another fact domain.

Fields

§fact: EngineFactIdV1

Fact whose value is invalid.

§

InvalidAcceptedInputs

The accepted-input list is empty, duplicated, or noncanonical.

§

InvalidDescriptorDefault

A descriptor’s applicability and default state disagree.

Fields

§setting: EngineSettingIdV1

Invalid setting descriptor.

§

UnknownSourceFact

A source references a fact absent from the profile.

Fields

§source_id: String

Source id.

§fact: EngineFactIdV1

Missing fact id.

§

SourceReferencesNonKnownFact

A source cites a fact whose state is not known.

Fields

§source_id: String

Source id.

§fact: EngineFactIdV1

Non-known fact id.

§

UnknownSourceSetting

A source references a descriptor absent from the profile.

Fields

§source_id: String

Source id.

§setting: EngineSettingIdV1

Missing setting id.

§

UnreferencedKnownFact

No primary source supports a known profile fact.

Fields

§fact: EngineFactIdV1

Unsupported known fact.

§

UnreferencedSetting

No primary source supports a setting descriptor.

Fields

§setting: EngineSettingIdV1

Unsupported descriptor.

§

InvalidSourceTransformPath

A source-transform path is malformed.

Fields

§reason: &'static str

Stable explanation of the malformed path.

§

UnknownMaterializedSetting

A materialized setting is absent from the profile.

Fields

§location: String

Stable document or clip location.

§setting: EngineSettingIdV1

Unknown setting id.

§

WrongSettingScope

A materialized setting is declared at the wrong scope.

Fields

§location: String

Stable document or clip location.

§setting: EngineSettingIdV1

Wrong-scope setting id.

§

NonApplicableSetting

A materialized setting is not applicable to the profile.

Fields

§location: String

Stable document or clip location.

§setting: EngineSettingIdV1

Non-applicable setting id.

§

WrongSettingDomain

A materialized value does not match its descriptor domain.

Fields

§location: String

Stable document or clip location.

§setting: EngineSettingIdV1

Invalid setting id.

§

MissingRequiredSetting

A required-without-default setting is absent.

Fields

§location: String

Stable document or clip location.

§setting: EngineSettingIdV1

Missing setting id.

§

IdentityMismatch

A canonical identity does not match its semantic preimage.

Fields

§contract: &'static str

Contract whose digest mismatched.

Trait Implementations§

Source§

impl Clone for EngineContractError

Source§

fn clone(&self) -> EngineContractError

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 EngineContractError

Source§

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

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

impl Display for EngineContractError

Source§

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

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

impl Eq for EngineContractError

Source§

impl Error for EngineContractError

1.30.0 · 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 PartialEq for EngineContractError

Source§

fn eq(&self, other: &EngineContractError) -> 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 EngineContractError

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.