[][src]Struct tendermint_testgen::light_block::LightBlock

pub struct LightBlock {
    pub header: Option<Header>,
    pub commit: Option<Commit>,
    pub validators: Option<Vec<Validator>>,
    pub next_validators: Option<Vec<Validator>>,
    pub provider: Option<PeerId>,
}

We use this data structure as a simplistic representation of LightClient's LightBlock

Fields

header: Option<Header>commit: Option<Commit>validators: Option<Vec<Validator>>next_validators: Option<Vec<Validator>>provider: Option<PeerId>

Implementations

impl LightBlock[src]

pub fn new(header: Header, commit: Commit) -> Self[src]

Constructs a new Testgen-specific light block

pub fn validators(self, validators: &[Validator]) -> Self[src]

pub fn next_validators(self, next_validators: &[Validator]) -> Self[src]

pub fn new_default(height: u64) -> Self[src]

pub fn next(&self) -> Self[src]

Produces a subsequent, i.e. at (height+1), light block to the supplied one

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

returns the height of LightBlock's header

pub fn chain_id(&self) -> String[src]

returns the chain_id of LightBlock's header

Trait Implementations

impl Clone for LightBlock[src]

impl Debug for LightBlock[src]

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

impl FromStr for LightBlock[src]

type Err = SimpleError

The associated error which can be returned from parsing.

impl Generator<TMLightBlock> for LightBlock[src]

impl Options for LightBlock[src]

impl Serialize 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, U> Into<U> for T where
    U: From<T>, 
[src]

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