pub enum WinProbSubcommands {
Set {
network_provider: NetworkProviderArgs,
winning_probability: f64,
private_key: PrivateKeyArgs,
},
Get {
network_provider: NetworkProviderArgs,
},
}
Expand description
CLI arguments for hopli win-prob
Variants§
Set
Set the global minimum ticket winning probability as an owner
Fields
§
network_provider: NetworkProviderArgs
Network name, contracts config file root, and customized provider, if available
§
private_key: PrivateKeyArgs
Access to the private key of a manager of Network Registry contract
Get
Read the current global minimum winning probability
Fields
§
network_provider: NetworkProviderArgs
Network name, contracts config file root, and customized provider, if available
Implementations§
Source§impl WinProbSubcommands
impl WinProbSubcommands
pub async fn execute_set_win_prob( network_provider: NetworkProviderArgs, winning_probability: f64, private_key: PrivateKeyArgs, ) -> Result<(), HelperErrors>
pub async fn execute_get_win_prob( network_provider: NetworkProviderArgs, ) -> Result<f64, HelperErrors>
Trait Implementations§
Source§impl Clone for WinProbSubcommands
impl Clone for WinProbSubcommands
Source§fn clone(&self) -> WinProbSubcommands
fn clone(&self) -> WinProbSubcommands
Returns a duplicate 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 moreSource§impl Cmd for WinProbSubcommands
impl Cmd for WinProbSubcommands
Source§impl CommandFactory for WinProbSubcommands
impl CommandFactory for WinProbSubcommands
Source§impl Debug for WinProbSubcommands
impl Debug for WinProbSubcommands
Source§impl FromArgMatches for WinProbSubcommands
impl FromArgMatches for WinProbSubcommands
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches
to self
.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches
to self
.Source§impl Parser for WinProbSubcommands
impl Parser for WinProbSubcommands
§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Parse from iterator, [exit][Error::exit] on error.
§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Parse from iterator, return Err on error.
§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Update from iterator, [exit][Error::exit] on error. Read more
§fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
Update from iterator, return Err on error.
Source§impl Subcommand for WinProbSubcommands
impl Subcommand for WinProbSubcommands
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Append to [
Command
] so it can instantiate self
via
[FromArgMatches::update_from_arg_matches_mut
] Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Test whether
Self
can parse a specific subcommandAuto Trait Implementations§
impl Freeze for WinProbSubcommands
impl RefUnwindSafe for WinProbSubcommands
impl Send for WinProbSubcommands
impl Sync for WinProbSubcommands
impl Unpin for WinProbSubcommands
impl UnwindSafe for WinProbSubcommands
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more