Enum Failure

Source
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

§expected: SchemaId

Expected schema id required by the contracts genesis.

§actual: SchemaId

Actual schema id provided by the consignment.

§

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}).

Fields

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

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}.

Fields

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

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}

Fields

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

NoPrevValency

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

Fields

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

StateTypeMismatch

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

Fields

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

MediaTypeMismatch

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

Fields

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

FungibleTypeMismatch

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

Fields

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

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) -> Status
where T: IntoIterator<Item = Failure>,

Creates a value from an iterator. Read more
Source§

impl PartialEq for Failure

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

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

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, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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

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

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

Source§

fn vzip(self) -> V

Source§

impl<T> VerifyEq for T
where 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 T
where T: for<'de> Deserialize<'de>,