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
sourceimpl Error for VarError
impl Error for VarError
sourcefn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourceimpl PartialEq<VarError> for VarError
impl PartialEq<VarError> for VarError
impl Eq for VarError
impl StructuralEq for VarError
impl StructuralPartialEq for VarError
Auto Trait Implementations
impl RefUnwindSafe for VarError
impl Send for VarError
impl Sync for VarError
impl Unpin for VarError
impl UnwindSafe for VarError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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