pub enum Failure {
Show 52 variants
SchemaMismatch {
expected: SchemaId,
actual: SchemaId,
},
SchemaBlankTransitionRedefined,
SchemaGlobalSemIdUnknown(u16, SemId),
SchemaOwnedSemIdUnknown(u16, SemId),
SchemaOpMetaSemIdUnknown(OpFullType, SemId),
SchemaOpEmptyInputs(OpFullType),
SchemaOpGlobalTypeUnknown(OpFullType, u16),
SchemaOpAssignmentTypeUnknown(OpFullType, u16),
SchemaOpValencyTypeUnknown(OpFullType, u16),
SubschemaGlobalStateMismatch(u16),
SubschemaAssignmentTypeMismatch(u16),
SubschemaValencyTypeMismatch(u16),
SubschemaTransitionTypeMismatch(u16),
SubschemaExtensionTypeMismatch(u16),
SubschemaOpMetaMismatch {
op_type: OpFullType,
expected: SemId,
actual: SemId,
},
SubschemaOpGlobalStateMismatch(OpFullType, u16),
SubschemaOpInputMismatch(OpFullType, u16),
SubschemaOpRedeemMismatch(OpFullType, u16),
SubschemaOpAssignmentsMismatch(OpFullType, u16),
SubschemaOpValencyMismatch(OpFullType, u16),
SchemaUnknownExtensionType(OpId, u16),
SchemaUnknownTransitionType(OpId, u16),
SchemaUnknownGlobalStateType(OpId, u16),
SchemaUnknownAssignmentType(OpId, u16),
SchemaUnknownValencyType(OpId, u16),
SchemaGlobalStateOccurrences(OpId, u16, OccurrencesMismatch),
SchemaGlobalStateLimit(OpId, u16, u16, u16),
SchemaInvalidMetadata(OpId, SemId),
SchemaInvalidGlobalValue(OpId, u16, SemId),
SchemaInvalidOwnedValue(OpId, u16, SemId),
SchemaInputOccurrences(OpId, u16, OccurrencesMismatch),
SchemaAssignmentOccurrences(OpId, u16, OccurrencesMismatch),
OperationAbsent(OpId),
TransitionAbsent(OpId),
BundleInvalid(BundleId),
NotAnchored(OpId),
NotInAnchor(OpId, Txid),
NoPrevState {
opid: OpId,
prev_id: OpId,
state_type: u16,
},
NoPrevOut(OpId, Opout),
ConfidentialSeal(Opout),
MpcInvalid(OpId, Txid),
SealNoWitnessTx(Txid),
SealInvalid(OpId, Txid, VerifyError),
AnchorInvalid(OpId, Txid, VerifyError),
ValencyNoParent {
opid: OpId,
prev_id: OpId,
valency: u16,
},
NoPrevValency {
opid: OpId,
prev_id: OpId,
valency: u16,
},
StateTypeMismatch {
opid: OpId,
state_type: u16,
expected: StateType,
found: StateType,
},
MediaTypeMismatch {
opid: OpId,
state_type: u16,
expected: MediaType,
found: MediaType,
},
FungibleTypeMismatch {
opid: OpId,
state_type: u16,
expected: FungibleType,
found: FungibleType,
},
BulletproofsInvalid(OpId, u16, String),
ScriptFailure(OpId, String),
Custom(String),
}
Variants§
SchemaMismatch
schema {actual} provided for the consignment validation doesn’t match schema {expected} used by the contract. This means that the consignment is invalid.
Fields
SchemaBlankTransitionRedefined
schema uses reserved type for the blank state transition.
SchemaGlobalSemIdUnknown(u16, SemId)
schema global state #{0} uses semantic data type absent in type library ({1}).
SchemaOwnedSemIdUnknown(u16, SemId)
schema owned state #{0} uses semantic data type absent in type library ({1}).
SchemaOpMetaSemIdUnknown(OpFullType, SemId)
schema metadata in {0} uses semantic data type absent in type library ({1}).
SchemaOpEmptyInputs(OpFullType)
schema for {0} has zero inputs.
SchemaOpGlobalTypeUnknown(OpFullType, u16)
schema for {0} references undeclared global state type {1}.
SchemaOpAssignmentTypeUnknown(OpFullType, u16)
schema for {0} references undeclared owned state type {1}.
SchemaOpValencyTypeUnknown(OpFullType, u16)
schema for {0} references undeclared valency type {1}.
SubschemaGlobalStateMismatch(u16)
invalid schema - no match with root schema requirements for global state type #{0}.
SubschemaAssignmentTypeMismatch(u16)
invalid schema - no match with root schema requirements for assignment type #{0}.
SubschemaValencyTypeMismatch(u16)
invalid schema - no match with root schema requirements for valency type #{0}.
SubschemaTransitionTypeMismatch(u16)
invalid schema - no match with root schema requirements for transition type #{0}.
SubschemaExtensionTypeMismatch(u16)
invalid schema - no match with root schema requirements for extension type #{0}.
SubschemaOpMetaMismatch
invalid schema - no match with root schema requirements for metadata type (required {expected}, found {actual}).
SubschemaOpGlobalStateMismatch(OpFullType, u16)
invalid schema - no match with root schema requirements for global state type #{1} used in {0}.
SubschemaOpInputMismatch(OpFullType, u16)
invalid schema - no match with root schema requirements for input type #{1} used in {0}.
SubschemaOpRedeemMismatch(OpFullType, u16)
invalid schema - no match with root schema requirements for redeem type #{1} used in {0}.
SubschemaOpAssignmentsMismatch(OpFullType, u16)
invalid schema - no match with root schema requirements for assignment type #{1} used in {0}.
SubschemaOpValencyMismatch(OpFullType, u16)
invalid schema - no match with root schema requirements for valency type #{1} used in {0}.
SchemaUnknownExtensionType(OpId, u16)
operation {0} uses invalid state extension type {1}.
SchemaUnknownTransitionType(OpId, u16)
operation {0} uses invalid state transition type {1}.
SchemaUnknownGlobalStateType(OpId, u16)
operation {0} uses invalid global state type {1}.
SchemaUnknownAssignmentType(OpId, u16)
operation {0} uses invalid assignment type {1}.
SchemaUnknownValencyType(OpId, u16)
operation {0} uses invalid valency type {1}.
SchemaGlobalStateOccurrences(OpId, u16, OccurrencesMismatch)
invalid number of global state entries of type {1} in operation {0} - {2}
SchemaGlobalStateLimit(OpId, u16, u16, u16)
number of global state entries of type {1} in operation {0} exceeds schema-defined maximum for that global state type ({2} vs {3}).
SchemaInvalidMetadata(OpId, SemId)
invalid metadata in operation {0} not matching semantic type id {1}.
SchemaInvalidGlobalValue(OpId, u16, SemId)
invalid global state value in operation {0}, state type #{1} which does not match semantic type id {2}.
SchemaInvalidOwnedValue(OpId, u16, SemId)
invalid owned state value in operation {0}, state type #{1} which does not match semantic type id {2}.
SchemaInputOccurrences(OpId, u16, OccurrencesMismatch)
invalid number of input entries of type {1} in operation {0} - {2}
SchemaAssignmentOccurrences(OpId, u16, OccurrencesMismatch)
invalid number of assignment entries of type {1} in operation {0} - {2}
OperationAbsent(OpId)
operation {0} is absent from the consignment.
TransitionAbsent(OpId)
state transition {0} is absent from the consignment.
BundleInvalid(BundleId)
bundle with id {0} is invalid.
NotAnchored(OpId)
transition {0} is not anchored.
NotInAnchor(OpId, Txid)
anchor for transition {0} doesn’t commit to the actual transition data.
NoPrevState
transition {opid} references state type {state_type} absent in the outputs of previous state transition {prev_id}.
NoPrevOut(OpId, Opout)
transition {0} references non-existing previous output {1}.
ConfidentialSeal(Opout)
seal defined in the history as a part of operation output {0} is confidential and can’t be validated.
MpcInvalid(OpId, Txid)
transition {0} is not a part of multi-protocol commitment for witness {1}; anchor is invalid.
SealNoWitnessTx(Txid)
witness transaction {0} is not known to the transaction resolver.
SealInvalid(OpId, Txid, VerifyError)
transition {0} doesn’t close seal with the witness transaction {1}. Details: {2}
AnchorInvalid(OpId, Txid, VerifyError)
transition {0} is not properly anchored to the witness transaction {1}. Details: {2}
ValencyNoParent
valency {valency} redeemed by state extension {opid} references non-existing operation {prev_id}
NoPrevValency
state extension {opid} references valency {valency} absent in the parent {prev_id}.
StateTypeMismatch
state in {opid}/{state_type} is of {found} type, while schema requires it to be {expected}.
MediaTypeMismatch
state in {opid}/{state_type} is of {found} type, while schema requires it to be {expected}.
FungibleTypeMismatch
state in {opid}/{state_type} is of {found} type, while schema requires it to be {expected}.
BulletproofsInvalid(OpId, u16, String)
invalid bulletproofs in {0}:{1}: {2}
ScriptFailure(OpId, String)
operation {0} is invalid: {1}
Custom(String)
Custom error by external services on top of RGB Core.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Failure
impl<'de> Deserialize<'de> for Failure
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Failure, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Failure, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl FromIterator<Failure> for Status
impl FromIterator<Failure> for Status
Source§impl Serialize for Failure
impl Serialize for Failure
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Eq for Failure
impl StructuralPartialEq for Failure
Auto Trait Implementations§
impl Freeze for Failure
impl RefUnwindSafe for Failure
impl Send for Failure
impl Sync for Failure
impl Unpin for Failure
impl UnwindSafe for Failure
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<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.