[−][src]Enum env_parser::EnvType
The different values an env file can hold
Variants
I32(i32)
I64(i64)
I128(i128)
U128(u128)
F32(f32)
F64(f64)
USize(usize)
StaticStr(String)
Implementations
impl EnvType
[src]
pub fn rust_type(&self) -> String
[src]
The Rust type
pub fn raw_value(&self) -> String
[src]
The actual value the env property holds
pub fn value(&self) -> String
[src]
Adds the type if needed behind the raw value This is needed if the user wants the value 1 to be an f32. If you only type:
ⓘThis example deliberately fails to compile
const MY_VARIABLE: f32 = 1;
The following compile error occurs: mismatched types [E0308] expected f32
, found i32
Thats why the type is needed behind the value:
const MY_VARIABLE: f32 = 1f32;
Auto Trait Implementations
impl !RefUnwindSafe for EnvType
impl !Send for EnvType
impl !Sync for EnvType
impl Unpin for EnvType
impl !UnwindSafe for EnvType
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,