pub struct OpenWalletArgs {
pub run_daemon: bool,
pub datadir: Option<PathBuf>,
pub persister: Option<Arc<dyn BarkPersister>>,
pub lock_manager: Option<Box<dyn LockManager>>,
pub onchain: Option<Arc<RwLock<dyn DaemonizableOnchainWallet>>>,
pub create_if_not_exists: bool,
pub create_without_server: bool,
}Expand description
Additional arguments for the Wallet::open function
Fields§
§run_daemon: boolWhether to run the background daemon
When disabled, you must manually call Wallet::sync to sync the wallet.
Default: true
datadir: Option<PathBuf>The data directory to use for this wallet
This field can be used under most platforms as an alternative to
providing the persister and lock_manager fields.
This field is ignored if persister and lock_manager are provided
or for the wasm32 platform.
Default: none
persister: Option<Arc<dyn BarkPersister>>The persister to use for this wallet
Default: returned by crate::persist::platform_default
lock_manager: Option<Box<dyn LockManager>>The lock manager to use for this wallet
Default: returned by crate::lock_manager::platform_default
On some platforms (linux, macos, windows) the default lock manager requires a datadir be provided.
onchain: Option<Arc<RwLock<dyn DaemonizableOnchainWallet>>>The onchain wallet to use, if any
Default: none
create_if_not_exists: boolWhether to create a new wallet if no wallet exists
Default: true
create_without_server: boolWhether to create a new wallet even if the Ark server cannot be reached
Default: false
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for OpenWalletArgs
impl !UnwindSafe for OpenWalletArgs
impl Freeze for OpenWalletArgs
impl Send for OpenWalletArgs
impl Sync for OpenWalletArgs
impl Unpin for OpenWalletArgs
impl UnsafeUnpin for OpenWalletArgs
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
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request