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
sourceimpl 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
sourceimpl Clone for LightChain
impl Clone for LightChain
sourcefn clone(&self) -> LightChain
fn clone(&self) -> LightChain
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
Auto Trait Implementations
impl RefUnwindSafe for LightChain
impl Send for LightChain
impl Sync for LightChain
impl Unpin for LightChain
impl UnwindSafe for LightChain
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more