pub struct EnvVarName(/* private fields */);Expand description
An environment-variable name, as probed with std::env::var_os.
Limits: 1–128 bytes, ASCII graphic characters only, and no =
(the environment-block separator).
Implementations§
Source§impl EnvVarName
impl EnvVarName
Sourcepub fn try_new(name: impl Into<String>) -> Result<Self, InvalidServiceValue>
pub fn try_new(name: impl Into<String>) -> Result<Self, InvalidServiceValue>
Validate and wrap an environment-variable name.
§Errors
Returns InvalidServiceValue when the name is empty, longer
than 128 bytes, contains a non-graphic ASCII byte, or contains
=.
Trait Implementations§
Source§impl AsRef<str> for EnvVarName
impl AsRef<str> for EnvVarName
Source§impl Clone for EnvVarName
impl Clone for EnvVarName
Source§impl Debug for EnvVarName
impl Debug for EnvVarName
Source§impl Display for EnvVarName
impl Display for EnvVarName
impl Eq for EnvVarName
Source§impl FromStr for EnvVarName
impl FromStr for EnvVarName
Source§impl Hash for EnvVarName
impl Hash for EnvVarName
Source§impl PartialEq for EnvVarName
impl PartialEq for EnvVarName
impl StructuralPartialEq for EnvVarName
Auto Trait Implementations§
impl Forget for EnvVarName
impl Freeze for EnvVarName
impl Move for EnvVarName
impl RefUnwindSafe for EnvVarName
impl Send for EnvVarName
impl Sync for EnvVarName
impl Unpin for EnvVarName
impl UnsafeUnpin for EnvVarName
impl UnwindSafe for EnvVarName
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