pub enum SchemaContractError {
Show 25 variants
EmptyIdentity,
IdentityTooLong {
len: usize,
max: usize,
},
InvalidSourceKey,
TooManyItems {
kind: &'static str,
len: usize,
max: usize,
},
DuplicateSourceKey,
DefinitionRemovalConflict,
DuplicateEditableName,
InvalidLocalReference,
FieldTypeDepthExceeded,
InvalidEnumLiteral,
RelationTypeMismatch,
RemovedReference,
MissingEntityStoreAssignment,
InvalidFieldPolicy,
InvalidFieldType,
LiteralTypeMismatch,
InvalidReferenceList,
InvalidLiteral,
InvalidExpression,
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.
InvalidSourceKey
A source key contains a non-canonical byte.
TooManyItems
One bounded collection exceeds its item limit.
Fields
DuplicateSourceKey
One definition, assignment, or removal key occurs more than once.
DefinitionRemovalConflict
One definition collides with an explicit removal.
DuplicateEditableName
Two definitions in one namespace use the same editable 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.
UnsupportedVersion
The proposal contract version is not the maintained current version.
Fields
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.
Encode
Serialization failed.
Decode
Bounded current-form decoding failed.
Trait Implementations§
Source§impl Clone for SchemaContractError
impl Clone for SchemaContractError
Source§fn clone(&self) -> SchemaContractError
fn clone(&self) -> SchemaContractError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SchemaContractError
impl Debug for SchemaContractError
Source§impl Display for SchemaContractError
impl Display for SchemaContractError
impl Eq for SchemaContractError
Source§impl Error for SchemaContractError
impl Error for SchemaContractError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<SchemaContractError> for FragmentLoweringError
impl From<SchemaContractError> for FragmentLoweringError
Source§fn from(source: SchemaContractError) -> Self
fn from(source: SchemaContractError) -> Self
Source§impl PartialEq for SchemaContractError
impl PartialEq for SchemaContractError
impl StructuralPartialEq for SchemaContractError
Auto Trait Implementations§
impl Freeze for SchemaContractError
impl RefUnwindSafe for SchemaContractError
impl Send for SchemaContractError
impl Sync for SchemaContractError
impl Unpin for SchemaContractError
impl UnsafeUnpin for SchemaContractError
impl UnwindSafe for SchemaContractError
Blanket Implementations§
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,
Source§impl<T> CustomError for T
impl<T> CustomError for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.