Struct tendermint_testgen::validator::Validator
source · [−]pub struct Validator {
pub id: Option<String>,
pub voting_power: Option<u64>,
pub proposer_priority: Option<i64>,
}
Fields
id: Option<String>
voting_power: Option<u64>
proposer_priority: Option<i64>
Implementations
sourceimpl Validator
impl Validator
pub fn new(id: &str) -> Self
pub fn id(self, id: &str) -> Self
pub fn voting_power(self, voting_power: u64) -> Self
pub fn proposer_priority(self, proposer_priority: i64) -> Self
sourcepub fn get_private_key(&self) -> Result<Ed25519, SimpleError>
pub fn get_private_key(&self) -> Result<Ed25519, SimpleError>
Get private key for this validator companion.
sourcepub fn get_public_key(&self) -> Result<Ed25519, SimpleError>
pub fn get_public_key(&self) -> Result<Ed25519, SimpleError>
Get public key for this validator companion.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Validator
impl<'de> Deserialize<'de> for Validator
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Generator<Info> for Validator
impl Generator<Info> for Validator
sourcefn merge_with_default(self, default: Self) -> Self
fn merge_with_default(self, default: Self) -> Self
Merge this companion with the another, default one. The options present in this object will override those in the default one. Read more
sourcefn generate(&self) -> Result<Info, SimpleError>
fn generate(&self) -> Result<Info, SimpleError>
Generate the complex object from this companion object.
sourcefn encode(&self) -> Result<String, SimpleError>
fn encode(&self) -> Result<String, SimpleError>
Generate and serialize the complex object
sourceimpl Options for Validator
impl Options for Validator
sourcefn parse<__S: AsRef<str>>(_parser: &mut Parser<'_, __S>) -> Result<Self, Error>
fn parse<__S: AsRef<str>>(_parser: &mut Parser<'_, __S>) -> Result<Self, Error>
Parses arguments until the given parser is exhausted or until an error is encountered. Read more
sourcefn command(&self) -> Option<&dyn Options>
fn command(&self) -> Option<&dyn Options>
Returns the subcommand instance, if present. Read more
sourcefn command_name(&self) -> Option<&'static str>
fn command_name(&self) -> Option<&'static str>
Returns the name of a parsed command, if present. Read more
sourcefn help_requested(&self) -> bool
fn help_requested(&self) -> bool
Returns whether the user supplied a “help” option to request usage information about the program or any contained subcommands. Read more
sourcefn parse_command<__S: AsRef<str>>(
name: &str,
_parser: &mut Parser<'_, __S>
) -> Result<Self, Error>
fn parse_command<__S: AsRef<str>>(
name: &str,
_parser: &mut Parser<'_, __S>
) -> Result<Self, Error>
Parses options for the named command.
sourcefn usage() -> &'static str
fn usage() -> &'static str
Returns a string showing usage and help for each supported option. Read more
sourcefn self_usage(&self) -> &'static str
fn self_usage(&self) -> &'static str
Returns a string showing usage and help for this options instance. Read more
sourcefn command_list() -> Option<&'static str>
fn command_list() -> Option<&'static str>
Returns a string listing available commands and help text. Read more
sourcefn command_usage(_name: &str) -> Option<&'static str>
fn command_usage(_name: &str) -> Option<&'static str>
Returns a usage string for the named command. Read more
sourcefn self_command_list(&self) -> Option<&'static str>
fn self_command_list(&self) -> Option<&'static str>
Returns a listing of available commands and help text. Read more
sourcefn parse_args<S>(args: &[S], style: ParsingStyle) -> Result<Self, Error> where
S: AsRef<str>,
fn parse_args<S>(args: &[S], style: ParsingStyle) -> Result<Self, Error> where
S: AsRef<str>,
Parses arguments received from the command line. Read more
sourcefn parse_args_or_exit(style: ParsingStyle) -> Self
fn parse_args_or_exit(style: ParsingStyle) -> Self
Parses arguments from the environment. Read more
sourcefn parse_args_default_or_exit() -> Self
fn parse_args_default_or_exit() -> Self
Parses arguments from the environment, using the default parsing style. Read more
sourcefn parse_args_default<S>(args: &[S]) -> Result<Self, Error> where
S: AsRef<str>,
fn parse_args_default<S>(args: &[S]) -> Result<Self, Error> where
S: AsRef<str>,
Parses arguments received from the command line, using the default parsing style. Read more
sourceimpl Ord for Validator
impl Ord for Validator
sourceimpl PartialOrd<Validator> for Validator
impl PartialOrd<Validator> for Validator
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Eq for Validator
Auto Trait Implementations
impl RefUnwindSafe for Validator
impl Send for Validator
impl Sync for Validator
impl Unpin for Validator
impl UnwindSafe for Validator
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)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more