pub struct GlobalWalletConfig {
pub config_file_path: Option<PathBuf>,
pub members: Option<GlobalWalletConfigMembers>,
}
Expand description
Wallet should be split into a separate configuration file
Fields
config_file_path: Option<PathBuf>
Keep track of the file we’ve read
members: Option<GlobalWalletConfigMembers>
Wallet members
Implementations
sourceimpl GlobalWalletConfig
impl GlobalWalletConfig
sourcepub fn for_chain(chain_type: &ChainTypes) -> GlobalWalletConfig
pub fn for_chain(chain_type: &ChainTypes) -> GlobalWalletConfig
Same as GlobalConfig::default() but further tweaks parameters to apply defaults for each chain type
sourcepub fn new(file_path: &str) -> Result<GlobalWalletConfig, ConfigError>
pub fn new(file_path: &str) -> Result<GlobalWalletConfig, ConfigError>
Requires the path to a config file
sourcepub fn update_paths(&mut self, wallet_home: &PathBuf)
pub fn update_paths(&mut self, wallet_home: &PathBuf)
Update paths
sourcepub fn ser_config(&mut self) -> Result<String, ConfigError>
pub fn ser_config(&mut self) -> Result<String, ConfigError>
Serialize config
sourcepub fn write_to_file(&mut self, name: &str) -> Result<(), ConfigError>
pub fn write_to_file(&mut self, name: &str) -> Result<(), ConfigError>
Write configuration to a file
Trait Implementations
sourceimpl Clone for GlobalWalletConfig
impl Clone for GlobalWalletConfig
sourcefn clone(&self) -> GlobalWalletConfig
fn clone(&self) -> GlobalWalletConfig
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for GlobalWalletConfig
impl Debug for GlobalWalletConfig
sourceimpl Default for GlobalWalletConfig
impl Default for GlobalWalletConfig
sourcefn default() -> GlobalWalletConfig
fn default() -> GlobalWalletConfig
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for GlobalWalletConfig
impl<'de> Deserialize<'de> for GlobalWalletConfig
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 PartialEq<GlobalWalletConfig> for GlobalWalletConfig
impl PartialEq<GlobalWalletConfig> for GlobalWalletConfig
sourcefn eq(&self, other: &GlobalWalletConfig) -> bool
fn eq(&self, other: &GlobalWalletConfig) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &GlobalWalletConfig) -> bool
fn ne(&self, other: &GlobalWalletConfig) -> bool
This method tests for !=
.
sourceimpl Serialize for GlobalWalletConfig
impl Serialize for GlobalWalletConfig
impl StructuralPartialEq for GlobalWalletConfig
Auto Trait Implementations
impl RefUnwindSafe for GlobalWalletConfig
impl Send for GlobalWalletConfig
impl Sync for GlobalWalletConfig
impl Unpin for GlobalWalletConfig
impl UnwindSafe for GlobalWalletConfig
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
impl<T> CloneAny for T where
T: Any + Clone,
impl<T> CloneAny for T where
T: Any + Clone,
fn clone_any(&self) -> Box<dyn CloneAny + 'static, Global>
fn clone_any_send(&self) -> Box<dyn CloneAny + Send + 'static, Global> where
T: Send,
fn clone_any_sync(&self) -> Box<dyn CloneAny + Sync + 'static, Global> where
T: Sync,
fn clone_any_send_sync(
&self
) -> Box<dyn CloneAny + Send + Sync + 'static, Global> where
T: Send + Sync,
impl<'a, T> DefaultFeatures<'a> for T where
T: 'a + Send + Sync + Clone,
impl<'a, T> DefaultFeatures<'a> for T where
T: 'a + Send + Sync + Clone,
fn clone_boxed(&self) -> Box<dyn DefaultFeatures<'a> + 'a, Global>
fn clone_boxed(&self) -> Box<dyn DefaultFeatures<'a> + 'a, Global>
Clone this value, and then immediately put it into a Box
behind a trait object of this trait. Read more
fn self_address_mut(&mut self) -> *mut ()
fn self_address_mut(&mut self) -> *mut ()
Returns the address of self
. Read more
impl<'a, T> NonSyncFeatures<'a> for T where
T: 'a + Clone,
impl<'a, T> NonSyncFeatures<'a> for T where
T: 'a + Clone,
fn clone_boxed(&self) -> Box<dyn NonSyncFeatures<'a> + 'a, Global>
fn clone_boxed(&self) -> Box<dyn NonSyncFeatures<'a> + 'a, Global>
Clone this value, and then immediately put it into a Box
behind a trait object of this trait. Read more
fn self_address_mut(&mut self) -> *mut ()
fn self_address_mut(&mut self) -> *mut ()
Returns the address of self
. Read more
impl<T> SafeBorrow<T> for T where
T: ?Sized,
impl<T> SafeBorrow<T> for T where
T: ?Sized,
fn borrow_replacement(ptr: &T) -> &T
fn borrow_replacement(ptr: &T) -> &T
Given ptr
, which was obtained from a prior call to Self::borrow()
,
return a value with the same nominal lifetime which is guaranteed to
survive mutations to Self
. Read more