Error

Enum Error 

Source
pub enum Error {
Show 38 variants UnbondingPeriodElapsed { consensus_state_id: ConsensusStateId, }, ChallengePeriodNotElapsed { state_machine_id: StateMachineId, update_time: Duration, current_time: Duration, }, ConsensusStateNotFound { consensus_state_id: ConsensusStateId, }, StateCommitmentNotFound { height: StateMachineHeight, }, FrozenConsensusClient { consensus_state_id: ConsensusStateId, }, RequestCommitmentNotFound { meta: Meta, }, RequestVerificationFailed { meta: Meta, }, RequestTimeoutNotElapsed { meta: Meta, timeout_timestamp: Duration, state_machine_time: Duration, }, RequestTimeoutVerificationFailed { meta: Meta, }, ResponseVerificationFailed { meta: Meta, }, ConsensusProofVerificationFailed { id: ConsensusClientId, }, ExpiredConsensusClient { id: ConsensusClientId, }, CannotHandleMessage, MembershipProofVerificationFailed(String), NonMembershipProofVerificationFailed(String), Custom(String), CannotCreateAlreadyExistingConsensusClient { id: ConsensusClientId, }, InsufficientProofHeight, ModuleNotFound(Vec<u8>), ConsensusStateIdNotRecognized { consensus_state_id: ConsensusStateId, }, ChallengePeriodNotConfigured { state_machine: StateMachineId, }, DuplicateConsensusStateId { consensus_state_id: ConsensusStateId, }, UnnbondingPeriodNotConfigured { consensus_state_id: ConsensusStateId, }, ModuleDispatchError { msg: String, meta: Meta, }, UnknownRequest { meta: Meta, }, UnknownResponse { meta: Meta, }, UnsolicitedResponse { meta: Meta, }, RequestTimeout { meta: Meta, }, ResponseTimeout { response: Meta, }, DuplicateRequest { meta: Meta, }, DuplicateResponse { meta: Meta, }, RequestProofMetadataNotValid { meta: Meta, }, RequestProxyProhibited { meta: Meta, }, ResponseProxyProhibited { meta: Meta, }, InvalidRequestDestination { meta: Meta, }, InvalidResponseDestination { meta: Meta, }, InvalidResponseType { meta: Meta, }, SignatureDecodingFailed,
}
Expand description

Errors that may be encountered by the ISMP module

Variants§

§

UnbondingPeriodElapsed

The unbonding period for the given consensus client has elapsed and can no longer process consensus updates.

Fields

§consensus_state_id: ConsensusStateId

The consensus client identifier

§

ChallengePeriodNotElapsed

The challange period for the given consensus client has not yet elapsed and cannot process new consensus updates in the mean time.

Fields

§state_machine_id: StateMachineId

The consensus client identifier

§update_time: Duration

The last time the consensus client was updated

§current_time: Duration

The current time

§

ConsensusStateNotFound

A consensus state was not found for the given consensus client.

Fields

§consensus_state_id: ConsensusStateId

The consensus client identifier

§

StateCommitmentNotFound

A state commitment was not found for the given consensus client.

Fields

§height: StateMachineHeight

The given state machine height

§

FrozenConsensusClient

The given consensus client has been frozen

Fields

§consensus_state_id: ConsensusStateId

The consensus client identifier

§

RequestCommitmentNotFound

The given request was not found

Fields

§meta: Meta

The request metadata

§

RequestVerificationFailed

The given request has failed state proof verification

Fields

§meta: Meta

The request metadata

§

RequestTimeoutNotElapsed

The given request has not yet timed-out

Fields

§meta: Meta

The request metadata

§timeout_timestamp: Duration

The timestamp at which the timeout elapses

§state_machine_time: Duration

The current time on the state machine

§

RequestTimeoutVerificationFailed

The given request has failed non-membership state proof verification

Fields

§meta: Meta

The request metadata

§

ResponseVerificationFailed

The given response has failed membership state proof verification

Fields

§meta: Meta

The response metadata

§

ConsensusProofVerificationFailed

Failed to verify the consensus proof for the given consensus client

Fields

§id: ConsensusClientId

The consensus client identifier

§

ExpiredConsensusClient

The given consensus client has expired

Fields

§id: ConsensusClientId

The consensus client identifier

§

CannotHandleMessage

Cannot handle the given message

§

MembershipProofVerificationFailed(String)

Membership proof verification failed: {0}

§

NonMembershipProofVerificationFailed(String)

Non-membership proof verification failed: {0}

§

Custom(String)

Custom error: {0}

§

CannotCreateAlreadyExistingConsensusClient

A consensus client with the given identifier already exists

Fields

§id: ConsensusClientId

The consensus client identifier

§

InsufficientProofHeight

Supplied proof height is invalid

§

ModuleNotFound(Vec<u8>)

An Ismp Module was not found for the given raw id

§

ConsensusStateIdNotRecognized

Unknown consensus state id

Fields

§consensus_state_id: ConsensusStateId

Consensus state Id

§

ChallengePeriodNotConfigured

Challenge period has not been configured for this consensus state

Fields

§state_machine: StateMachineId

State Machine Id

§

DuplicateConsensusStateId

Consensus state id already exists

Fields

§consensus_state_id: ConsensusStateId

Consensus state Id

§

UnnbondingPeriodNotConfigured

Unbonding period has not been configured for this consensus state

Fields

§consensus_state_id: ConsensusStateId

Consensus state Id

§

ModuleDispatchError

Error from dispatching a request to a module

Fields

§msg: String

Descriptive error message

§meta: Meta

the request metadata

§

UnknownRequest

Attempted to respond to/timeout an unknown request

Fields

§meta: Meta

Unknown request metadata

§

UnknownResponse

Attempted to time-out an unknown response

Fields

§meta: Meta

Unknown response metadata

§

UnsolicitedResponse

Request commitment for a response does not exist

Fields

§meta: Meta

Unsolicited response metadata

§

RequestTimeout

Timed out request found in batch

Fields

§meta: Meta

Timed out Request metadata

§

ResponseTimeout

Timed out response found in batch

Fields

§response: Meta

Timed out Response metadata

§

DuplicateRequest

Duplicate request

Fields

§meta: Meta

Duplicate request metadata

§

DuplicateResponse

Duplicate response

Fields

§meta: Meta

Duplicate response metadata

§

RequestProofMetadataNotValid

Request source does not match proof metadata

Fields

§meta: Meta

The Request metadata

§

RequestProxyProhibited

Proxy cannot be used when a direct connection exists

Fields

§meta: Meta

The Request metadata

§

ResponseProxyProhibited

Proxy cannot be used when a direct connection exists

Fields

§meta: Meta

The Response metadata

§

InvalidRequestDestination

Host is not a proxy and destination chain does is not the host

Fields

§meta: Meta

The Request metadata

§

InvalidResponseDestination

The response destination does not match

Fields

§meta: Meta

The response metadata

§

InvalidResponseType

Expected get request found post

Fields

§meta: Meta

The request metadata

§

SignatureDecodingFailed

Error decoding signature

Trait Implementations§

Source§

impl Debug for Error

Source§

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

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

impl Decode for Error

Source§

fn decode<__CodecInputEdqy: Input>( __codec_input_edqy: &mut __CodecInputEdqy, ) -> Result<Self, Error>

Attempt to deserialise the value from input.
Source§

fn decode_into<I>( input: &mut I, dst: &mut MaybeUninit<Self>, ) -> Result<DecodeFinished, Error>
where I: Input,

Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
Source§

fn skip<I>(input: &mut I) -> Result<(), Error>
where I: Input,

Attempt to skip the encoded value from input. Read more
Source§

fn encoded_fixed_size() -> Option<usize>

Returns the fixed encoded size of the type. Read more
Source§

impl Display for Error

Source§

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

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

impl Encode for Error

Source§

fn size_hint(&self) -> usize

If possible give a hint of expected size of the encoding. Read more
Source§

fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy, )

Convert self to a slice and append it to the destination.
Source§

fn encode(&self) -> Vec<u8>

Convert self to an owned vector.
Source§

fn using_encoded<R, F>(&self, f: F) -> R
where F: FnOnce(&[u8]) -> R,

Convert self to a slice and then invoke the given closure with it.
Source§

fn encoded_size(&self) -> usize

Calculates the encoded size. Read more
Source§

impl Error for Error

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl PartialEq for Error

Source§

fn eq(&self, other: &Error) -> 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 TypeInfo for Error

Source§

type Identity = Error

The type identifying for which type info is provided. Read more
Source§

fn type_info() -> Type

Returns the static type identifier for Self.
Source§

impl EncodeLike for Error

Source§

impl Eq for Error

Source§

impl StructuralPartialEq for Error

Auto Trait Implementations§

§

impl Freeze for Error

§

impl RefUnwindSafe for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl UnwindSafe for Error

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> DecodeAll for T
where T: Decode,

Source§

fn decode_all(input: &mut &[u8]) -> Result<T, Error>

Decode Self and consume all of the given input data. Read more
Source§

impl<T> DecodeLimit for T
where T: Decode,

Source§

fn decode_all_with_depth_limit( limit: u32, input: &mut &[u8], ) -> Result<T, Error>

Decode Self and consume all of the given input data. Read more
Source§

fn decode_with_depth_limit<I>(limit: u32, input: &mut I) -> Result<T, Error>
where I: Input,

Decode Self with the given maximum recursion depth and advance input by the number of bytes consumed. 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

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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T, Outer> IsWrappedBy<Outer> for T
where Outer: AsRef<T> + AsMut<T> + From<T>, T: From<Outer>,

Source§

fn from_ref(outer: &Outer) -> &T

Get a reference to the inner from the outer.

Source§

fn from_mut(outer: &mut Outer) -> &mut T

Get a mutable reference to the inner from the outer.

Source§

impl<T> KeyedVec for T
where T: Codec,

Source§

fn to_keyed_vec(&self, prepend_key: &[u8]) -> Vec<u8>

Return an encoding of Self prepended by given slice.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> SaturatedConversion for T

Source§

fn saturated_from<T>(t: T) -> Self
where Self: UniqueSaturatedFrom<T>,

Convert from a value of T into an equivalent instance of Self. Read more
Source§

fn saturated_into<T>(self) -> T
where Self: UniqueSaturatedInto<T>,

Consume self to return an equivalent value of T. 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<S, T> UncheckedInto<T> for S
where T: UncheckedFrom<S>,

Source§

fn unchecked_into(self) -> T

The counterpart to unchecked_from.
Source§

impl<T, S> UniqueSaturatedInto<T> for S
where T: Bounded, S: TryInto<T>,

Source§

fn unique_saturated_into(self) -> T

Consume self to return an equivalent value of T.
Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<S> Codec for S
where S: Decode + Encode,

Source§

impl<T> EncodeLike<&&T> for T
where T: Encode,

Source§

impl<T> EncodeLike<&T> for T
where T: Encode,

Source§

impl<T> EncodeLike<&mut T> for T
where T: Encode,

Source§

impl<T> EncodeLike<Arc<T>> for T
where T: Encode,

Source§

impl<T> EncodeLike<Box<T>> for T
where T: Encode,

Source§

impl<T> EncodeLike<Rc<T>> for T
where T: Encode,

Source§

impl<T> Error for T
where T: 'static + Debug + Display + Send + Sync,

Source§

impl<S> FullCodec for S
where S: Decode + FullEncode,

Source§

impl<S> FullEncode for S
where S: Encode + EncodeLike,

Source§

impl<T> JsonSchemaMaybe for T

Source§

impl<T> MaybeDebug for T
where T: Debug,

Source§

impl<T> MaybeRefUnwindSafe for T
where T: RefUnwindSafe,

Source§

impl<T> StaticTypeInfo for T
where T: TypeInfo + 'static,