Struct tendermint_testgen::light_block::LightBlock [−][src]
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(mut self: Self, validators: &[Validator]) -> Self
[src]
pub fn next_validators(mut self: Self, next_validators: &[Validator]) -> Self
[src]
pub fn provider(mut self: Self, provider: &str) -> 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
pub fn last_block_id_hash(&self) -> Option<Hash>
[src]
returns the last_block_id hash of LightBlock's header
Trait Implementations
impl Clone for LightBlock
[src]
fn clone(&self) -> LightBlock
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for LightBlock
[src]
impl<'de> Deserialize<'de> for LightBlock
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl FromStr for LightBlock
[src]
type Err = SimpleError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Self, Self::Err>
[src]
impl Generator<TMLightBlock> for LightBlock
[src]
fn merge_with_default(self, default: Self) -> Self
[src]
fn generate(&self) -> Result<TMLightBlock, SimpleError>
[src]
fn encode(&self) -> Result<String, SimpleError>
[src]
impl Options for LightBlock
[src]
fn parse<__S: AsRef<str>>(_parser: &mut Parser<'_, __S>) -> Result<Self, Error>
[src]
fn command(&self) -> Option<&dyn Options>
[src]
fn command_name(&self) -> Option<&'static str>
[src]
fn help_requested(&self) -> bool
[src]
fn parse_command<__S: AsRef<str>>(
name: &str,
_parser: &mut Parser<'_, __S>
) -> Result<Self, Error>
[src]
name: &str,
_parser: &mut Parser<'_, __S>
) -> Result<Self, Error>
fn usage() -> &'static str
[src]
fn self_usage(&self) -> &'static str
[src]
fn command_list() -> Option<&'static str>
[src]
fn command_usage(_name: &str) -> Option<&'static str>
[src]
fn self_command_list(&self) -> Option<&'static str>
[src]
pub fn parse_args<S>(args: &[S], style: ParsingStyle) -> Result<Self, Error> where
S: AsRef<str>,
[src]
S: AsRef<str>,
pub fn parse_args_or_exit(style: ParsingStyle) -> Self
[src]
pub fn parse_args_default_or_exit() -> Self
[src]
pub fn parse_args_default<S>(args: &[S]) -> Result<Self, Error> where
S: AsRef<str>,
[src]
S: AsRef<str>,
impl Serialize for LightBlock
[src]
Auto Trait Implementations
impl RefUnwindSafe for LightBlock
[src]
impl Send for LightBlock
[src]
impl Sync for LightBlock
[src]
impl Unpin for LightBlock
[src]
impl UnwindSafe for LightBlock
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,