hopli::key_pair

Trait ArgEnvReader

Source
pub trait ArgEnvReader<T, K> {
    // Required methods
    fn get_key(&self) -> Option<K>;
    fn read(&self, default_env_name: &str) -> Result<T, HelperErrors>;
    fn read_default(&self) -> Result<T, HelperErrors>;
}

Required Methods§

Source

fn get_key(&self) -> Option<K>

return the wrapped key

Source

fn read(&self, default_env_name: &str) -> Result<T, HelperErrors>

Try to read the value from the cli param (given by the key), or read from the env variable

Source

fn read_default(&self) -> Result<T, HelperErrors>

Read the private key with a default env value and return an address string

Implementors§