Struct aptos_cli_config::CliConfig
source · [−]pub struct CliConfig {
pub profiles: Option<HashMap<String, ProfileConfig>>,
}Expand description
Config saved to .aptos/config.yaml
Fields
profiles: Option<HashMap<String, ProfileConfig>>Map of profile configs
Implementations
sourceimpl CliConfig
impl CliConfig
sourcepub fn config_exists() -> bool
pub fn config_exists() -> bool
Checks if the config exists in the current working directory
sourcepub fn load() -> CliTypedResult<Self>
pub fn load() -> CliTypedResult<Self>
Loads the config from the current working directory
pub fn load_profile(profile: &str) -> CliTypedResult<Option<ProfileConfig>>
pub fn remove_profile(&mut self, profile: &str) -> Option<ProfileConfig>
sourcepub fn save(&self) -> CliTypedResult<()>
pub fn save(&self) -> CliTypedResult<()>
Saves the config to ./.aptos/config.yaml
sourcepub fn load_from_path(path: &Path) -> CliTypedResult<CliConfig>
pub fn load_from_path(path: &Path) -> CliTypedResult<CliConfig>
Loads the config from the specified path.
sourcepub fn load_from_root(root: &Path) -> CliTypedResult<CliConfig>
pub fn load_from_root(root: &Path) -> CliTypedResult<CliConfig>
Loads the config from the package root.
sourcepub fn try_to_string(&self) -> CliTypedResult<String>
pub fn try_to_string(&self) -> CliTypedResult<String>
Trait Implementations
sourceimpl<'de> Deserialize<'de> for CliConfig
impl<'de> Deserialize<'de> for CliConfig
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
Auto Trait Implementations
impl RefUnwindSafe for CliConfig
impl Send for CliConfig
impl Sync for CliConfig
impl Unpin for CliConfig
impl UnwindSafe for CliConfig
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
sourceimpl<T> TestOnlyHash for T where
T: Serialize + ?Sized,
impl<T> TestOnlyHash for T where
T: Serialize + ?Sized,
sourcefn test_only_hash(&self) -> HashValue
fn test_only_hash(&self) -> HashValue
Generates a hash used only for tests.