[][src]Struct tendermint_light_client::types::LightBlock

pub struct LightBlock {
    pub signed_header: SignedHeader,
    pub validators: ValidatorSet,
    pub next_validators: ValidatorSet,
    pub provider: PeerId,
}

A light block is the core data structure used by the light client. It records everything the light client needs to know about a block.

Fields

signed_header: SignedHeader

Header and commit of this block

validators: ValidatorSet

Validator set at the block height

next_validators: ValidatorSet

Validator set at the next block height

provider: PeerId

The peer ID of the node that provided this block

Implementations

impl LightBlock[src]

pub fn new(
    signed_header: SignedHeader,
    validators: ValidatorSet,
    next_validators: ValidatorSet,
    provider: PeerId
) -> LightBlock
[src]

Constructs a new light block

pub fn height(&self) -> Height[src]

Returns the height of this block.

Note

This is a shorthand for block.signed_header.header.height.

Trait Implementations

impl Clone for LightBlock[src]

impl Debug for LightBlock[src]

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

impl Display for LightBlock[src]

impl PartialEq<LightBlock> for LightBlock[src]

impl Serialize for LightBlock[src]

impl StructuralPartialEq for LightBlock[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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

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

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> 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, 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>,