Struct tendermint_testgen::light_chain::LightChain
source · pub struct LightChain {
pub info: Info,
pub light_blocks: Vec<LightBlock>,
}
Fields§
§info: Info
§light_blocks: Vec<LightBlock>
Implementations§
source§impl LightChain
impl LightChain
pub fn new(info: Info, light_blocks: Vec<LightBlock>) -> Self
pub fn default_with_length(num: u64) -> Self
sourcepub fn advance_chain(&mut self) -> &LightBlock
pub fn advance_chain(&mut self) -> &LightBlock
expects at least one LightBlock in the Chain
sourcepub fn block(&self, target_height: u64) -> Option<&LightBlock>
pub fn block(&self, target_height: u64) -> Option<&LightBlock>
fetches a block from LightChain at a certain height it returns None if a block does not exist for the target_height
sourcepub fn block_mut(&mut self, target_height: u64) -> Option<&mut LightBlock>
pub fn block_mut(&mut self, target_height: u64) -> Option<&mut LightBlock>
fetches a mutable block from LightChain at a certain height it returns None if a block does not exist for the target_height
sourcepub fn latest_block(&self) -> &LightBlock
pub fn latest_block(&self) -> &LightBlock
fetches the latest block from LightChain
Trait Implementations§
source§impl Clone for LightChain
impl Clone for LightChain
source§fn clone(&self) -> LightChain
fn clone(&self) -> LightChain
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for LightChain
impl RefUnwindSafe for LightChain
impl Send for LightChain
impl Sync for LightChain
impl Unpin for LightChain
impl UnwindSafe for LightChain
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more