pub struct Config {
pub json_rpc_url: String,
pub websocket_url: String,
pub keypair_path: String,
pub address_labels: HashMap<String, String>,
pub commitment: String,
}
Fields§
§json_rpc_url: String
§websocket_url: String
§keypair_path: String
§address_labels: HashMap<String, String>
§commitment: String
Implementations§
Source§impl Config
impl Config
pub fn load(config_file: &str) -> Result<Self, Error>
pub fn save(&self, config_file: &str) -> Result<(), Error>
pub fn compute_websocket_url(json_rpc_url: &str) -> String
pub fn import_address_labels<P>(&mut self, filename: P) -> Result<(), Error>
pub fn export_address_labels<P>(&self, filename: P) -> Result<(), Error>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
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
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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