ErrorExt

Trait ErrorExt 

Source
pub trait ErrorExt {
    // Required methods
    fn not_enough_trust(&self) -> Option<VotingPowerTally>;
    fn has_expired(&self) -> bool;
    fn is_timeout(&self) -> Option<Duration>;
    fn is_io(&self) -> bool;
    fn is_height_too_high(&self) -> bool;
}
Expand description

Extension methods for ErrorKind

Required Methods§

Source

fn not_enough_trust(&self) -> Option<VotingPowerTally>

Whether this error means that the light block cannot be trusted w.r.t. the latest trusted state.

Source

fn has_expired(&self) -> bool

Whether this error means that the light block has expired, ie. it’s outside of the trusting period.

Source

fn is_timeout(&self) -> Option<Duration>

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

Source

fn is_io(&self) -> bool

Whether an I/O error occurred when querying a node.

Source

fn is_height_too_high(&self) -> bool

Whether the height of the requested light block is higher than the latest height available on the node.

Implementors§