pub(crate) struct Args {Show 28 fields
pub(crate) config: Option<String>,
pub(crate) chain: String,
pub(crate) consensus: bool,
pub(crate) single_node: bool,
pub(crate) wallet_path: String,
pub(crate) wallet_pass: String,
pub(crate) database: String,
pub(crate) rpc_listen: Url,
pub(crate) consensus_p2p_accept: Vec<Url>,
pub(crate) consensus_p2p_external: Vec<Url>,
pub(crate) consensus_slots: u32,
pub(crate) consensus_p2p_peer: Vec<Url>,
pub(crate) consensus_peer_rpc: Vec<Url>,
pub(crate) consensus_p2p_seed: Vec<Url>,
pub(crate) consensus_seed_rpc: Vec<Url>,
pub(crate) consensus_p2p_transports: Vec<String>,
pub(crate) sync_p2p_accept: Vec<Url>,
pub(crate) sync_p2p_external: Vec<Url>,
pub(crate) sync_slots: u32,
pub(crate) sync_p2p_peer: Vec<Url>,
pub(crate) sync_p2p_seed: Vec<Url>,
pub(crate) sync_p2p_transports: Vec<String>,
pub(crate) localnet: bool,
pub(crate) channel_log: bool,
pub(crate) cashier_pub: Vec<String>,
pub(crate) faucet_pub: Vec<String>,
pub(crate) clock_sync: bool,
pub(crate) verbose: u8,
}
Fields§
§config: Option<String>
Configuration file to use
chain: String
Chain to use (testnet, mainnet)
consensus: bool
Participate in consensus
single_node: bool
Enable single-node mode for local testing
wallet_path: String
Path to wallet database
wallet_pass: String
Password for the wallet database
database: String
Path to blockchain database
rpc_listen: Url
JSON-RPC listen URL
consensus_p2p_accept: Vec<Url>
P2P accept addresses for the consensus protocol (repeatable flag)
consensus_p2p_external: Vec<Url>
P2P external addresses for the consensus protocol (repeatable flag)
consensus_slots: u32
Connection slots for the consensus protocol
consensus_p2p_peer: Vec<Url>
Connect to peer for the consensus protocol (repeatable flag)
consensus_peer_rpc: Vec<Url>
Peers JSON-RPC listen URL for clock synchronization (repeatable flag)
consensus_p2p_seed: Vec<Url>
Connect to seed for the consensus protocol (repeatable flag)
consensus_seed_rpc: Vec<Url>
Seed nodes JSON-RPC listen URL for clock synchronization (repeatable flag)
consensus_p2p_transports: Vec<String>
Prefered transports of outbound connections for the consensus protocol (repeatable flag)
sync_p2p_accept: Vec<Url>
P2P accept addresses for the syncing protocol (repeatable flag)
sync_p2p_external: Vec<Url>
P2P external addresses for the syncing protocol (repeatable flag)
sync_slots: u32
Connection slots for the syncing protocol
sync_p2p_peer: Vec<Url>
Connect to peer for the syncing protocol (repeatable flag)
sync_p2p_seed: Vec<Url>
Connect to seed for the syncing protocol (repeatable flag)
sync_p2p_transports: Vec<String>
Prefered transports of outbound connections for the syncing protocol (repeatable flag)
localnet: bool
Enable localnet hosts
channel_log: bool
Enable channel log
cashier_pub: Vec<String>
Whitelisted cashier public key (repeatable flag)
faucet_pub: Vec<String>
Whitelisted faucet public key (repeatable flag)
clock_sync: bool
Verify system clock is correct
verbose: u8
Increase verbosity (-vvv supported)
Trait Implementations§
source§impl<'de> Deserialize<'de> for Argswhere
Args: Default,
impl<'de> Deserialize<'de> for Argswhere Args: Default,
source§fn 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>,
source§impl StructOpt for Args
impl StructOpt for Args
source§fn from_clap(matches: &ArgMatches<'_>) -> Self
fn from_clap(matches: &ArgMatches<'_>) -> Self
clap::ArgMatches
. It’s guaranteed to succeed
if matches
originates from an App
generated by StructOpt::clap
called on
the same type, otherwise it must panic.source§fn from_args() -> Selfwhere
Self: Sized,
fn from_args() -> Selfwhere Self: Sized,
std::env::args_os
).
Calls clap::Error::exit
on failure, printing the error message and aborting the program.source§fn from_args_safe() -> Result<Self, Error>where
Self: Sized,
fn from_args_safe() -> Result<Self, Error>where Self: Sized,
std::env::args_os
).
Unlike StructOpt::from_args
, returns clap::Error
on failure instead of aborting the program,
so calling .exit
is up to you.source§fn from_iter<I>(iter: I) -> Selfwhere
Self: Sized,
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString> + Clone,
fn from_iter<I>(iter: I) -> Selfwhere Self: Sized, I: IntoIterator, <I as IntoIterator>::Item: Into<OsString> + Clone,
Vec
of your making.
Print the error message and quit the program in case of failure. Read moresource§fn from_iter_safe<I>(iter: I) -> Result<Self, Error>where
Self: Sized,
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString> + Clone,
fn from_iter_safe<I>(iter: I) -> Result<Self, Error>where Self: Sized, I: IntoIterator, <I as IntoIterator>::Item: Into<OsString> + Clone,
Vec
of your making. Read moresource§impl StructOptToml for Args
impl StructOptToml for Args
source§fn merge<'a>(from_toml: Self, from_args: Self, args: &ArgMatches<'_>) -> Selfwhere
Self: Sized + StructOpt + Deserialize<'a>,
fn merge<'a>(from_toml: Self, from_args: Self, args: &ArgMatches<'_>) -> Selfwhere Self: Sized + StructOpt + Deserialize<'a>,
source§fn from_clap_with_toml<'a>(
toml_str: &'a str,
args: &ArgMatches<'_>
) -> Result<Self, Error>where
Self: Sized + StructOpt + Deserialize<'a>,
fn from_clap_with_toml<'a>( toml_str: &'a str, args: &ArgMatches<'_> ) -> Result<Self, Error>where Self: Sized + StructOpt + Deserialize<'a>,
clap::ArgMatches
with initial values from TOML.source§fn from_args_with_toml<'a>(toml_str: &'a str) -> Result<Self, Error>where
Self: Sized + StructOpt + Deserialize<'a>,
fn from_args_with_toml<'a>(toml_str: &'a str) -> Result<Self, Error>where Self: Sized + StructOpt + Deserialize<'a>,
source§fn from_iter_with_toml<'a, I>(toml_str: &'a str, iter: I) -> Result<Self, Error>where
Self: Sized + StructOpt + Deserialize<'a>,
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString> + Clone,
fn from_iter_with_toml<'a, I>(toml_str: &'a str, iter: I) -> Result<Self, Error>where Self: Sized + StructOpt + Deserialize<'a>, I: IntoIterator, <I as IntoIterator>::Item: Into<OsString> + Clone,
Auto Trait Implementations§
impl RefUnwindSafe for Args
impl Send for Args
impl Sync for Args
impl Unpin for Args
impl UnwindSafe for Args
Blanket Implementations§
source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
source§impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,
source§impl<T> FmtForward for T
impl<T> FmtForward for T
source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where Self: Display,
self
to use its Display
implementation when
Debug
-formatted.source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where Self: Pointer,
self
to use its Pointer
implementation when
Debug
-formatted.source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere T: ?Sized,
source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere Self: Sized,
source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere R: 'a,
self
and passes that borrow into the pipe function. Read moresource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere R: 'a,
self
and passes that borrow into the pipe function. Read moresource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere
Self: Borrow<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere Self: Borrow<B>, B: 'a + ?Sized, R: 'a,
source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> Rwhere
Self: BorrowMut<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R ) -> Rwhere Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,
source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere
Self: AsRef<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere Self: AsRef<U>, U: 'a + ?Sized, R: 'a,
self
, then passes self.as_ref()
into the pipe function.source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere
Self: AsMut<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere Self: AsMut<U>, U: 'a + ?Sized, R: 'a,
self
, then passes self.as_mut()
into the pipe
function.source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> Tap for T
impl<T> Tap for T
source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere Self: Borrow<B>, B: ?Sized,
Borrow<B>
of a value. Read moresource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere Self: BorrowMut<B>, B: ?Sized,
BorrowMut<B>
of a value. Read moresource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere Self: AsRef<R>, R: ?Sized,
AsRef<R>
view of a value. Read moresource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere Self: AsMut<R>, R: ?Sized,
AsMut<R>
view of a value. Read moresource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere
Self: Deref<Target = T>,
T: ?Sized,
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere Self: Deref<Target = T>, T: ?Sized,
Deref::Target
of a value. Read moresource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere Self: DerefMut<Target = T> + Deref, T: ?Sized,
Deref::Target
of a value. Read moresource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere Self: Borrow<B>, B: ?Sized,
.tap_borrow()
only in debug builds, and is erased in release
builds.source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere Self: BorrowMut<B>, B: ?Sized,
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere Self: AsRef<R>, R: ?Sized,
.tap_ref()
only in debug builds, and is erased in release
builds.source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere Self: AsMut<R>, R: ?Sized,
.tap_ref_mut()
only in debug builds, and is erased in release
builds.