Enum tendermint_light_client::errors::ErrorKind[][src]

pub enum ErrorKind {
    Io(IoError),
    Store,
    NoPrimary,
    NoWitnesses,
    NoWitnessLeft,
    ForkDetected(Vec<PeerId>),
    NoInitialTrustedState,
    NoTrustedState(Status),
    TargetLowerThanTrustedState {
        target_height: Height,
        trusted_height: Height,
    },
    TrustedStateOutsideTrustingPeriod {
        trusted_state: Box<LightBlock>,
        options: Options,
    },
    BisectionFailed(HeightHeight),
    InvalidLightBlock(VerificationError),
    InvalidAdjacentHeaders {
        h1: Hash,
        h2: Hash,
    },
    MissingLastBlockId(Height),
    ChannelDisconnected,
}

The various error kinds raised by this library

Variants

I/O error

Store

Store error

NoPrimary

No primary

NoWitnesses

No witnesses

NoWitnessLeft

No witness left

ForkDetected(Vec<PeerId>)

A fork has been detected between some peers

NoInitialTrustedState

No initial trusted state

NoTrustedState(Status)

No trusted state

TargetLowerThanTrustedState

Target height for the light client lower than latest trusted state height

Fields of TargetLowerThanTrustedState

target_height: Height

Target height

trusted_height: Height

Latest trusted state height

TrustedStateOutsideTrustingPeriod

The trusted state is outside of the trusting period

Fields of TrustedStateOutsideTrustingPeriod

trusted_state: Box<LightBlock>

Trusted state

options: Options

Light client options

BisectionFailed(HeightHeight)

Bisection failed when reached trusted state

InvalidLightBlock(VerificationError)

Verification failed for a light block

InvalidAdjacentHeaders

Hash mismatch between two adjacent headers

Fields of InvalidAdjacentHeaders

h1: Hash

Hash #1

h2: Hash

Hash #2

MissingLastBlockId(Height)

Missing last_block_id field for header at given height

ChannelDisconnected

Internal channel disconnected

Implementations

impl ErrorKind[src]

pub fn context(self, source: impl Into<BoxError>) -> Context<Self>[src]

Add additional context (i.e. include a source error and capture a backtrace). You can convert the resulting Context into an Error by calling .into().

Trait Implementations

impl Clone for ErrorKind[src]

impl Debug for ErrorKind[src]

impl<'de> Deserialize<'de> for ErrorKind[src]

impl Display for ErrorKind[src]

impl Error for ErrorKind[src]

impl ErrorExt for ErrorKind[src]

fn is_timeout(&self) -> bool[src]

Whether this error means that a timeout occured when querying a node.

impl From<IoError> for ErrorKind[src]

impl From<RecvError> for ErrorKind[src]

impl<T: Debug + Send + Sync + 'static> From<SendError<T>> for ErrorKind[src]

impl PartialEq<ErrorKind> for ErrorKind[src]

impl Serialize for ErrorKind[src]

impl StructuralPartialEq for ErrorKind[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Conv for T

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> TryConv for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

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