Enum Failure

Source
pub enum Failure {
Show 51 variants ContractChainNetMismatch(ChainNet), ResolverChainNetMismatch(ChainNet), SchemaMismatch { expected: SchemaId, actual: SchemaId, }, TypeSystemMismatch(SemId, Option<Ty<SemId>>, Ty<SemId>), SchemaGlobalSemIdUnknown(GlobalStateType, SemId), SchemaOwnedSemIdUnknown(AssignmentType, SemId), SchemaMetaSemIdUnknown(MetaType, SemId), SchemaOpEmptyInputs(OpFullType), SchemaOpMetaTypeUnknown(OpFullType, MetaType), SchemaOpGlobalTypeUnknown(OpFullType, GlobalStateType), SchemaOpAssignmentTypeUnknown(OpFullType, AssignmentType), SchemaUnknownTransitionType(OpId, TransitionType), SchemaUnknownMetaType(OpId, MetaType), SchemaUnknownGlobalStateType(OpId, GlobalStateType), SchemaUnknownAssignmentType(OpId, AssignmentType), SchemaUnknownSealClosingStrategy(OpId, SealClosingStrategy), SchemaGlobalStateOccurrences(OpId, GlobalStateType, OccurrencesMismatch), SchemaGlobalStateLimit(OpId, GlobalStateType, u16, u24), SchemaNoMetadata(OpId, MetaType), SchemaInvalidMetadata(OpId, SemId), SchemaInvalidGlobalValue(OpId, GlobalStateType, SemId), SchemaInvalidOwnedValue(OpId, AssignmentType, SemId), SchemaInputOccurrences(OpId, AssignmentType, OccurrencesMismatch), SchemaAssignmentOccurrences(OpId, AssignmentType, OccurrencesMismatch), CyclicGraph(OpId), OperationAbsent(OpId), AnchorAbsent(BundleId), WitnessIdAbsent(BundleId), ContractMismatch(OpId, ContractId), DoubleSpend(Opout), ExtraKnownTransition(BundleId), TransitionIdMismatch(OpId, OpId), UnorderedTransition(OpId), WitnessMissingInput(BundleId, OpId, Txid), MissingInputMapTransition(BundleId, OpId), NoPrevState { opid: OpId, prev_id: OpId, state_type: AssignmentType, }, NoPrevOut(OpId, Opout), ConfidentialSeal(Opout), SealNoPubWitness(BundleId, Txid, WitnessResolverError), SealsInvalid(BundleId, Txid, String), SealsUnvalidated(OpId), MpcInvalid(BundleId, Txid, InvalidProof), NoDbcOutput(Txid), InvalidProofType(Txid, CloseMethod), StateTypeMismatch { opid: OpId, state_type: AssignmentType, expected: StateType, found: StateType, }, FungibleTypeMismatch { opid: OpId, state_type: AssignmentType, expected: FungibleType, found: FungibleType, }, ScriptFailure(OpId, Option<u8>, Option<String>), ContractStateFilled(OpId), MissingScript(OpId, LibId), ScriptIDMismatch(OpId, LibId, LibId), Custom(String),
}

Variants§

§

ContractChainNetMismatch(ChainNet)

the contract chain-network pair doesn’t match (validator runs in chain_net={0} configuration).

§

ResolverChainNetMismatch(ChainNet)

the resolver chain-network pair doesn’t match (validator runs in chain_net={0} configuration).

§

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 contract genesis.

§actual: SchemaId

Actual schema id provided by the consignment.

§

TypeSystemMismatch(SemId, Option<Ty<SemId>>, Ty<SemId>)

type with sem_id {0} does not match the trusted one {1:?} (found {2})

§

SchemaGlobalSemIdUnknown(GlobalStateType, SemId)

schema global state #{0} uses semantic data type absent in type library ({1}).

§

SchemaOwnedSemIdUnknown(AssignmentType, SemId)

schema owned state #{0} uses semantic data type absent in type library ({1}).

§

SchemaMetaSemIdUnknown(MetaType, SemId)

schema metadata #{0} uses semantic data type absent in type library ({1}).

§

SchemaOpEmptyInputs(OpFullType)

schema for {0} has zero inputs.

§

SchemaOpMetaTypeUnknown(OpFullType, MetaType)

schema for {0} references undeclared metadata type {1}.

§

SchemaOpGlobalTypeUnknown(OpFullType, GlobalStateType)

schema for {0} references undeclared global state type {1}.

§

SchemaOpAssignmentTypeUnknown(OpFullType, AssignmentType)

schema for {0} references undeclared owned state type {1}.

§

SchemaUnknownTransitionType(OpId, TransitionType)

operation {0} uses invalid state transition type {1}.

§

SchemaUnknownMetaType(OpId, MetaType)

operation {0} uses invalid metadata type {1}.

§

SchemaUnknownGlobalStateType(OpId, GlobalStateType)

operation {0} uses invalid global state type {1}.

§

SchemaUnknownAssignmentType(OpId, AssignmentType)

operation {0} uses invalid assignment type {1}.

§

SchemaUnknownSealClosingStrategy(OpId, SealClosingStrategy)

operation {0} uses invalid seal closing strategy {1}.

§

SchemaGlobalStateOccurrences(OpId, GlobalStateType, OccurrencesMismatch)

invalid number of global state entries of type {1} in operation {0} - {2}

§

SchemaGlobalStateLimit(OpId, GlobalStateType, u16, u24)

number of global state entries of type {1} in operation {0} exceeds schema-defined maximum for that global state type ({2} vs {3}).

§

SchemaNoMetadata(OpId, MetaType)

required metadata type {1} is not present in the operation {0}.

§

SchemaInvalidMetadata(OpId, SemId)

invalid metadata in operation {0} not matching semantic type id {1}.

§

SchemaInvalidGlobalValue(OpId, GlobalStateType, SemId)

invalid global state value in operation {0}, state type #{1} which does not match semantic type id {2}.

§

SchemaInvalidOwnedValue(OpId, AssignmentType, SemId)

invalid owned state value in operation {0}, state type #{1} which does not match semantic type id {2}.

§

SchemaInputOccurrences(OpId, AssignmentType, OccurrencesMismatch)

invalid number of input entries of type {1} in operation {0} - {2}

§

SchemaAssignmentOccurrences(OpId, AssignmentType, OccurrencesMismatch)

invalid number of assignment entries of type {1} in operation {0} - {2}

§

CyclicGraph(OpId)

operation {0} is referenced within the history multiple times. RGB contracts allow only direct acyclic graphs.

§

OperationAbsent(OpId)

operation {0} is absent from the consignment.

§

AnchorAbsent(BundleId)

anchor for transitio bundle {0} is absent in the consignment.

§

WitnessIdAbsent(BundleId)

witness id for transition bundle {0} is absent in the consignment.

§

ContractMismatch(OpId, ContractId)

operation {0} is under a different contract {1}.

§

DoubleSpend(Opout)

opout {0} appears more than once as input

§

ExtraKnownTransition(BundleId)

transition bundle {0} known transitions references a state transition which is not in the bundle input map.

§

TransitionIdMismatch(OpId, OpId)

transition claims ID {0} which differs from the actual one {1}

§

UnorderedTransition(OpId)

found a transition {0} not in order.

§

WitnessMissingInput(BundleId, OpId, Txid)

transition bundle {0} references non-existing input in witness {2} for the state transition {1}.

§

MissingInputMapTransition(BundleId, OpId)

transition bundle {0} input map is missing an opout {1} in input on a known transition

§

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: AssignmentType
§

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.

§

SealNoPubWitness(BundleId, Txid, WitnessResolverError)

bundle {0} public witness {1} is not known to the resolver. Resolver reported error {2}

§

SealsInvalid(BundleId, Txid, String)

transition bundle {0} doesn’t close seal with the witness {1}. Details: {2}

§

SealsUnvalidated(OpId)

single-use seals for the operation {0} were not validated, which probably indicates unanchored state transition.

§

MpcInvalid(BundleId, Txid, InvalidProof)

transition bundle {0} is not properly anchored to the witness {1}. Details: {2}

§

NoDbcOutput(Txid)

witness transaction {0} has no taproot or OP_RETURN output.

§

InvalidProofType(Txid, CloseMethod)

first DBC-compatible output of witness transaction {0} doesn’t match the provided proof type ({1})

§

StateTypeMismatch

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

Fields

§opid: OpId
§state_type: AssignmentType
§expected: StateType
§

FungibleTypeMismatch

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

Fields

§opid: OpId
§state_type: AssignmentType
§expected: FungibleType
§

ScriptFailure(OpId, Option<u8>, Option<String>)

evaluation of AluVM script for operation {0} has failed with the code {1:?} and message {2:?}.

§

ContractStateFilled(OpId)

contract state can’t fit more data (at operation id {0}).

§

MissingScript(OpId, LibId)

operation {0} commits to a missing script {1}.

§

ScriptIDMismatch(OpId, LibId, LibId)

operation {0} commits to a script which ID {1} doesn’t match the actual one {2}.

§

Custom(String)

Custom error by external services on top of RGB Consensus.

Trait Implementations§

Source§

impl Clone for Failure

Source§

fn clone(&self) -> Failure

Returns a duplicate 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

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

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

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::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

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

impl FromIterator<Failure> for Status

Source§

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

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::Ok, __S::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, dest: *mut u8)

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