[−][src]Struct bdk_cli::WalletOpt
Wallet global options and sub-command
A structopt struct that parses wallet global options and
sub-command from the command line or from a String vector. See WalletSubCommand for details
on parsing sub-commands.
Example
let cli_args = vec!["bdk-cli", "--network", "testnet", "--descriptor", "wpkh(tpubEBr4i6yk5nf5DAaJpsi9N2pPYBeJ7fZ5Z9rmN4977iYLCGco1VyjB9tvvuvYtfZzjD5A8igzgw3HeWeeKFmanHYqksqZXYXGsw5zjnj7KM9/44'/1'/0'/0/*)", "sync", "--max_addresses", "50"]; // to get WalletOpt from OS command line args use: // let wallet_opt = WalletOpt::from_args(); let wallet_opt = WalletOpt::from_iter(&cli_args); let expected_wallet_opt = WalletOpt { network: Network::Testnet, wallet: "main".to_string(), proxy: None, descriptor: "wpkh(tpubEBr4i6yk5nf5DAaJpsi9N2pPYBeJ7fZ5Z9rmN4977iYLCGco1VyjB9tvvuvYtfZzjD5A8igzgw3HeWeeKFmanHYqksqZXYXGsw5zjnj7KM9/44'/1'/0'/0/*)".to_string(), change_descriptor: None, #[cfg(feature = "esplora")] esplora: None, #[cfg(feature = "esplora")] esplora_concurrency: 4, electrum: "ssl://electrum.blockstream.info:60002".to_string(), subcommand: WalletSubCommand::Sync { max_addresses: Some(50) }, }; assert_eq!(expected_wallet_opt, wallet_opt);
Fields
network: NetworkSets the network
wallet: StringSelects the wallet to use
proxy: Option<String>Sets the SOCKS5 proxy for the Electrum client
descriptor: StringSets the descriptor to use for the external addresses
change_descriptor: Option<String>Sets the descriptor to use for internal addresses
esplora: Option<String>Use the esplora server if given as parameter
esplora_concurrency: u8Concurrency of requests made to the esplora server
electrum: StringSets the Electrum server to use
subcommand: WalletSubCommandWallet sub-command
Trait Implementations
impl Clone for WalletOpt[src]
impl Debug for WalletOpt[src]
impl PartialEq<WalletOpt> for WalletOpt[src]
impl StructOpt for WalletOpt[src]
pub fn clap<'a, 'b>() -> App<'a, 'b>[src]
pub fn from_clap(matches: &ArgMatches<'_>) -> Self[src]
pub fn from_args() -> Self[src]
pub fn from_args_safe() -> Result<Self, Error>[src]
pub fn from_iter<I>(iter: I) -> Self where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone, [src]
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
pub fn from_iter_safe<I>(iter: I) -> Result<Self, Error> where
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone, [src]
I: IntoIterator,
<I as IntoIterator>::Item: Into<OsString>,
<I as IntoIterator>::Item: Clone,
impl StructOptInternal for WalletOpt[src]
pub fn augment_clap<'a, 'b>(app: App<'a, 'b>) -> App<'a, 'b>[src]
pub fn is_subcommand() -> bool[src]
pub fn from_subcommand(
_sub: (&'b str, Option<&'b ArgMatches<'a>>)
) -> Option<Self>[src]
_sub: (&'b str, Option<&'b ArgMatches<'a>>)
) -> Option<Self>
impl StructuralPartialEq for WalletOpt[src]
Auto Trait Implementations
impl RefUnwindSafe for WalletOpt[src]
impl Send for WalletOpt[src]
impl Sync for WalletOpt[src]
impl Unpin for WalletOpt[src]
impl UnwindSafe for WalletOpt[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> From<T> for T[src]
impl<T> Instrument for T[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T> Instrument for T[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
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>,