[][src]Trait tendermint_testgen::generator::Generator

pub trait Generator<Output: Serialize>: FromStr<Err = SimpleError> + Clone {
    pub fn merge_with_default(self, default: Self) -> Self;
pub fn generate(&self) -> Result<Output, SimpleError>; pub fn encode(&self) -> Result<String, SimpleError> { ... } }

A trait that allows to generate complex objects from simple companion objects. A companion type should have a simple API, leaving most fields optional.

Required methods

pub fn merge_with_default(self, default: Self) -> Self[src]

Merge this companion with the another, default one. The options present in this object will override those in the default one.

pub fn generate(&self) -> Result<Output, SimpleError>[src]

Generate the complex object from this companion object.

Loading content...

Provided methods

pub fn encode(&self) -> Result<String, SimpleError>[src]

Generate and serialize the complex object

Loading content...

Implementors

impl Generator<TMLightBlock> for LightBlock[src]

impl Generator<Commit> for Commit[src]

impl Generator<Header> for Header[src]

impl Generator<Time> for Time[src]

impl Generator<Info> for Validator[src]

impl Generator<Set> for ValidatorSet[src]

impl Generator<Vote> for Vote[src]

Loading content...