Trait envstruct::EnvParseNested

source ·
pub trait EnvParseNested {
    // Required methods
    fn parse_from_env_var(
        var_name: impl AsRef<str>,
        default: Option<&str>,
    ) -> Result<Self, EnvStructError>
       where Self: Sized;
    fn get_env_entries(
        prefix: impl AsRef<str>,
        default: Option<&str>,
    ) -> Result<Vec<EnvEntry>, EnvStructError>;

    // Provided methods
    fn new() -> Result<Self, EnvStructError>
       where Self: Sized { ... }
    fn with_prefix(prefix: impl AsRef<str>) -> Result<Self, EnvStructError>
       where Self: Sized { ... }
}

Required Methods§

source

fn parse_from_env_var( var_name: impl AsRef<str>, default: Option<&str>, ) -> Result<Self, EnvStructError>
where Self: Sized,

source

fn get_env_entries( prefix: impl AsRef<str>, default: Option<&str>, ) -> Result<Vec<EnvEntry>, EnvStructError>

Provided Methods§

source

fn new() -> Result<Self, EnvStructError>
where Self: Sized,

source

fn with_prefix(prefix: impl AsRef<str>) -> Result<Self, EnvStructError>
where Self: Sized,

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T: EnvParseNested> EnvParseNested for Option<T>

source§

fn parse_from_env_var( var_name: impl AsRef<str>, default: Option<&str>, ) -> Result<Self, EnvStructError>
where Self: Sized,

source§

fn get_env_entries( prefix: impl AsRef<str>, default: Option<&str>, ) -> Result<Vec<EnvEntry>, EnvStructError>

source§

impl<T: EnvParseNested> EnvParseNested for Rc<T>

source§

fn parse_from_env_var( var_name: impl AsRef<str>, default: Option<&str>, ) -> Result<Self, EnvStructError>

source§

fn get_env_entries( prefix: impl AsRef<str>, default: Option<&str>, ) -> Result<Vec<EnvEntry>, EnvStructError>

source§

impl<T: EnvParseNested> EnvParseNested for Arc<T>

source§

fn parse_from_env_var( var_name: impl AsRef<str>, default: Option<&str>, ) -> Result<Self, EnvStructError>

source§

fn get_env_entries( prefix: impl AsRef<str>, default: Option<&str>, ) -> Result<Vec<EnvEntry>, EnvStructError>

source§

impl<T: EnvParseNested> EnvParseNested for Cell<T>

source§

fn parse_from_env_var( var_name: impl AsRef<str>, default: Option<&str>, ) -> Result<Self, EnvStructError>

source§

fn get_env_entries( prefix: impl AsRef<str>, default: Option<&str>, ) -> Result<Vec<EnvEntry>, EnvStructError>

source§

impl<T: EnvParseNested> EnvParseNested for RefCell<T>

source§

fn parse_from_env_var( var_name: impl AsRef<str>, default: Option<&str>, ) -> Result<Self, EnvStructError>

source§

fn get_env_entries( prefix: impl AsRef<str>, default: Option<&str>, ) -> Result<Vec<EnvEntry>, EnvStructError>

Implementors§

source§

impl<K, V> EnvParseNested for EnvMap<K, V>
where K: FromStr + Hash + Eq, V: EnvParsePrimitive,