Struct grin_wallet_config::types::GlobalWalletConfig
source · 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§
source§impl 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
Trait Implementations§
source§impl Clone for GlobalWalletConfig
impl Clone for GlobalWalletConfig
source§fn clone(&self) -> GlobalWalletConfig
fn clone(&self) -> GlobalWalletConfig
Returns a copy 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 Debug for GlobalWalletConfig
impl Debug for GlobalWalletConfig
source§impl Default for GlobalWalletConfig
impl Default for GlobalWalletConfig
source§fn default() -> GlobalWalletConfig
fn default() -> GlobalWalletConfig
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for GlobalWalletConfig
impl<'de> Deserialize<'de> for GlobalWalletConfig
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>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for GlobalWalletConfig
impl PartialEq for GlobalWalletConfig
source§fn 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 ==
.source§impl Serialize for GlobalWalletConfig
impl Serialize for GlobalWalletConfig
impl StructuralPartialEq for GlobalWalletConfig
Auto Trait Implementations§
impl Freeze for GlobalWalletConfig
impl RefUnwindSafe for GlobalWalletConfig
impl Send for GlobalWalletConfig
impl Sync for GlobalWalletConfig
impl Unpin for GlobalWalletConfig
impl UnwindSafe for GlobalWalletConfig
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