pub enum VarError {
NotPresent,
NotUnicode(OsString),
}
Expand description
The error type for operations interacting with environment variables.
Possibly returned from env::var()
.
Variants§
NotPresent
The specified environment variable was not present in the current process’s environment.
NotUnicode(OsString)
The specified environment variable was found, but it did not contain valid unicode data. The found data is returned as a payload of this variant.
Trait Implementations§
1.0.0 · source§impl Error for VarError
impl Error for VarError
source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§impl PartialEq for VarError
impl PartialEq for VarError
impl Eq for VarError
impl StructuralPartialEq for VarError
Auto Trait Implementations§
impl Freeze for VarError
impl RefUnwindSafe for VarError
impl Send for VarError
impl Sync for VarError
impl Unpin for VarError
impl UnwindSafe for VarError
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