pub struct EnvParser;Expand description
Environment variable parser
Implementations§
Source§impl EnvParser
impl EnvParser
Sourcepub fn parse_assignment(input: &str) -> Result<(String, String)>
pub fn parse_assignment(input: &str) -> Result<(String, String)>
Parse a single environment variable assignment (KEY=value)
Sourcepub fn parse_env_string(input: &str) -> Result<HashMap<String, String>>
pub fn parse_env_string(input: &str) -> Result<HashMap<String, String>>
Parse multiple environment variable assignments from a string Handles quoted values and escaping
Sourcepub fn extract_env_vars(
args: &[String],
) -> (HashMap<String, String>, Vec<String>)
pub fn extract_env_vars( args: &[String], ) -> (HashMap<String, String>, Vec<String>)
Parse environment variables from command-line style input Separates env vars from other arguments
Auto Trait Implementations§
impl Freeze for EnvParser
impl RefUnwindSafe for EnvParser
impl Send for EnvParser
impl Sync for EnvParser
impl Unpin for EnvParser
impl UnwindSafe for EnvParser
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