pub struct Config {
pub wallet: Option<String>,
pub rpc: Option<String>,
pub explorer: Option<String>,
pub network: Option<String>,
pub networks: BTreeMap<String, NetworkConfig>,
pub default_database: Option<String>,
pub databases: BTreeMap<String, String>,
pub database_metadata: BTreeMap<String, DatabaseMetadata>,
}Expand description
Local octra-sqlite configuration.
Fields§
§wallet: Option<String>§rpc: Option<String>§explorer: Option<String>§network: Option<String>§networks: BTreeMap<String, NetworkConfig>§default_database: Option<String>§databases: BTreeMap<String, String>§database_metadata: BTreeMap<String, DatabaseMetadata>Implementations§
Source§impl Config
impl Config
pub fn rpc_for_network(&self, network: &str) -> Option<String>
pub fn explorer_for_network(&self, network: &str) -> Option<String>
pub fn apply_active_network_profile(&mut self)
pub fn metadata_for_target( &self, requested: &str, target: &DatabaseTarget, ) -> Option<&DatabaseMetadata>
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
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin 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