Skip to main content

SchemaContractError

Enum SchemaContractError 

Source
pub enum SchemaContractError {
Show 35 variants EmptyIdentity, IdentityTooLong { len: usize, max: usize, }, InvalidSourceKey, TooManyItems { kind: &'static str, len: usize, max: usize, }, DuplicateSourceKey, DefinitionRemovalConflict, DuplicateName, InvalidLocalReference, FieldTypeDepthExceeded, InvalidEnumLiteral, RelationTypeMismatch, RemovedReference, MissingEntityStoreAssignment, InvalidFieldPolicy, InvalidFieldType, LiteralTypeMismatch, InvalidReferenceList, InvalidLiteral, InvalidExpression, InvalidRuleOperation, InvalidRuleTarget, InvalidEntityVersion, InvalidMigrationPlan, InvalidMigrationReference, DuplicateMigrationSource, DuplicateMigrationTarget, MigrationVersionGap, InvalidMigrationTransform, UnsupportedMigrationProgramVersion { found: u16, supported: u16, }, UnsupportedVersion { found: u16, supported: u16, }, UnsupportedCapability, NonCanonical, EncodedTooLarge { len: usize, max: usize, }, Encode, Decode,
}
Expand description

Failure while constructing, validating, encoding, or decoding proposal data.

Variants§

§

EmptyIdentity

A required bounded text identity is empty.

§

IdentityTooLong

A bounded text identity exceeds its byte limit.

Fields

§len: usize

Actual byte length.

§max: usize

Maximum admitted byte length.

§

InvalidSourceKey

A source key contains a non-canonical byte.

§

TooManyItems

One bounded collection exceeds its item limit.

Fields

§kind: &'static str

Collection vocabulary used for bounded diagnostics.

§len: usize

Actual item count.

§max: usize

Maximum admitted item count.

§

DuplicateSourceKey

One definition, assignment, or removal key occurs more than once.

§

DefinitionRemovalConflict

One definition collides with an explicit removal.

§

DuplicateName

Two definitions in one namespace use the same current name.

§

InvalidLocalReference

A definition refers to an absent key in its local closure.

§

FieldTypeDepthExceeded

One inline field-type contract exceeds the maintained depth bound.

§

InvalidEnumLiteral

An enum literal names a non-enum type or an absent local variant.

§

RelationTypeMismatch

A relation’s source and target field contracts differ.

§

RemovedReference

One explicit removal deletes a definition still referenced by the proposal.

§

MissingEntityStoreAssignment

One entity does not have exactly one target-store assignment.

§

InvalidFieldPolicy

A field combines incompatible nullability, insert, type, or management policy.

§

InvalidFieldType

A field type carries an impossible width, scale, or bound.

§

LiteralTypeMismatch

A field default literal does not fit the exact declared field contract.

§

InvalidReferenceList

One ordered field/reference list is empty or contains duplicates.

§

InvalidLiteral

A literal is malformed or non-canonical.

§

InvalidExpression

A source check expression is malformed.

§

InvalidRuleOperation

A targeted durable-rule operation or its operand ordering is invalid.

§

InvalidRuleTarget

A targeted durable rule cannot select the declared nominal value.

§

InvalidEntityVersion

A declared entity source version is zero.

§

InvalidMigrationPlan

A coordinated source migration is empty or otherwise malformed.

§

InvalidMigrationReference

One migration selector does not resolve in the current proposal.

§

DuplicateMigrationSource

More than one migration operation claims the same predecessor object.

§

DuplicateMigrationTarget

More than one migration operation claims the same current target.

§

MigrationVersionGap

An entity migration does not describe the immediate predecessor.

§

InvalidMigrationTransform

A migration transform is outside the closed current vocabulary.

§

UnsupportedMigrationProgramVersion

The migration program version is not the maintained current version.

Fields

§found: u16

Version carried by the plan.

§supported: u16

Sole current version understood by this crate.

§

UnsupportedVersion

The proposal contract version is not the maintained current version.

Fields

§found: u16

Version carried by the proposal.

§supported: u16

Sole current version understood by this crate.

§

UnsupportedCapability

The proposal requires a capability not understood by this contract.

§

NonCanonical

A decoded proposal is structurally valid but not canonically ordered.

§

EncodedTooLarge

Encoded bytes exceed the relevant transport limit.

Fields

§len: usize

Actual byte length.

§max: usize

Maximum admitted byte length.

§

Encode

Serialization failed.

§

Decode

Bounded current-form decoding failed.

Trait Implementations§

Source§

impl Clone for SchemaContractError

Source§

fn clone(&self) -> SchemaContractError

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 SchemaContractError

Source§

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

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

impl Display for SchemaContractError

Source§

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

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

impl Eq for SchemaContractError

Source§

impl Error for SchemaContractError

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<SchemaContractError> for FragmentLoweringError

Source§

fn from(source: SchemaContractError) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for SchemaContractError

Source§

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

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> CustomError for T
where T: Display + Debug + Send + Sync + 'static,

Source§

fn as_any(&self) -> &(dyn Any + Sync + Send + 'static)

Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + Sync + Send + 'static)

Source§

fn as_box_any(self: Box<T>) -> Box<dyn Any + Sync + Send>

Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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.