pub enum SchemaContractError {
Show 27 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,
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.
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.
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()