pub struct EnvName(/* private fields */);Expand description
The name of an environment variable: not empty, without = and without a
NUL. It is kept as written; a process environment matches it
ASCII-case-insensitively.
Implementations§
Source§impl EnvName
impl EnvName
Sourcepub fn new(text: impl Into<String>) -> Result<Self, FieldError>
pub fn new(text: impl Into<String>) -> Result<Self, FieldError>
text as a variable name.
§Errors
FieldError::InvalidEnvName when text is empty or holds a =,
FieldError::Nul when it holds a NUL.
Trait Implementations§
impl Eq for EnvName
impl StructuralPartialEq for EnvName
Auto Trait Implementations§
impl Freeze for EnvName
impl RefUnwindSafe for EnvName
impl Send for EnvName
impl Sync for EnvName
impl Unpin for EnvName
impl UnsafeUnpin for EnvName
impl UnwindSafe for EnvName
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