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

Fields

§expected: SchemaId

Expected schema id required by the contracts genesis.

§actual: SchemaId

Actual schema id provided by the consignment.

schema {actual} provided for the consignment validation doesn’t match schema {expected} used by the contract. This means that the consignment is invalid.

§

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

Fields

§op_type: OpFullType
§expected: SemId
§actual: SemId

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

Fields

§opid: OpId
§prev_id: OpId
§state_type: u16

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

Fields

§opid: OpId
§prev_id: OpId
§valency: u16

valency {valency} redeemed by state extension {opid} references non-existing operation {prev_id}

§

NoPrevValency

Fields

§opid: OpId
§prev_id: OpId
§valency: u16

state extension {opid} references valency {valency} absent in the parent {prev_id}.

§

StateTypeMismatch

Fields

§opid: OpId
§state_type: u16
§expected: StateType

state in {opid}/{state_type} is of {found} type, while schema requires it to be {expected}.

§

MediaTypeMismatch

Fields

§opid: OpId
§state_type: u16
§expected: MediaType

state in {opid}/{state_type} is of {found} type, while schema requires it to be {expected}.

§

FungibleTypeMismatch

Fields

§opid: OpId
§state_type: u16
§expected: FungibleType

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 Clone for Failure

source§

fn clone(&self) -> Failure

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Failure

source§

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

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

impl<'de> Deserialize<'de> for Failure

source§

fn deserialize<__D>( __deserializer: __D ) -> Result<Failure, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for Failure

source§

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

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

impl FromIterator<Failure> for Status

source§

fn from_iter<T>(iter: T) -> Statuswhere T: IntoIterator<Item = Failure>,

Creates a value from an iterator. Read more
source§

impl PartialEq<Failure> for Failure

source§

fn eq(&self, other: &Failure) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for Failure

source§

fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for Failure

source§

impl StructuralEq for Failure

source§

impl StructuralPartialEq for Failure

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<Q, K> Equivalent<K> for Qwhere 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 Twhere 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<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

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 Twhere T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.
source§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> VerifyEq for Twhere T: Eq,

source§

fn verify_eq(&self, other: &T) -> bool

Verifies commit-equivalence of two instances of the same type.
source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,