pub enum EnvEnumResult<T: Clone> {
Ok(T),
Absent(String),
IncorrectCast(String),
}Expand description
§Environment Enum Result
Anything that isn’t in the Ok status is an error.
Variants§
Implementations§
Source§impl<T: Clone> EnvEnumResult<T>
impl<T: Clone> EnvEnumResult<T>
Sourcepub fn panic_if_absent(&self) -> T
pub fn panic_if_absent(&self) -> T
Will panic for everything that isn’t Ok
use dotenv_enum::env_errors::EnvEnumResult;
assert_eq!(EnvEnumResult::Ok(4).panic_if_absent(), 4)Trait Implementations§
impl<T: Clone> StructuralPartialEq for EnvEnumResult<T>
Auto Trait Implementations§
impl<T> Freeze for EnvEnumResult<T>where
T: Freeze,
impl<T> RefUnwindSafe for EnvEnumResult<T>where
T: RefUnwindSafe,
impl<T> Send for EnvEnumResult<T>where
T: Send,
impl<T> Sync for EnvEnumResult<T>where
T: Sync,
impl<T> Unpin for EnvEnumResult<T>where
T: Unpin,
impl<T> UnwindSafe for EnvEnumResult<T>where
T: UnwindSafe,
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