Struct tendermint_light_client::types::LightBlock [−][src]
pub struct LightBlock {
pub signed_header: SignedHeader,
pub validators: ValidatorSet,
pub next_validators: ValidatorSet,
pub provider: PeerId,
}Expand description
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: SignedHeaderHeader and commit of this block
validators: ValidatorSetValidator set at the block height
next_validators: ValidatorSetValidator set at the next block height
provider: PeerIdThe peer ID of the node that provided this block
Implementations
pub fn new(
signed_header: SignedHeader,
validators: ValidatorSet,
next_validators: ValidatorSet,
provider: PeerId
) -> LightBlock
pub fn new(
signed_header: SignedHeader,
validators: ValidatorSet,
next_validators: ValidatorSet,
provider: PeerId
) -> LightBlockConstructs a new light block
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>, Deserialize this value from the given Serde deserializer. Read more
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
Auto Trait Implementations
impl RefUnwindSafe for LightBlockimpl Send for LightBlockimpl Sync for LightBlockimpl Unpin for LightBlockimpl UnwindSafe for LightBlockBlanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
type Output = T
type Output = TShould always be Self
pub fn vzip(self) -> V