pub struct EnvVariableValue(/* private fields */);Expand description
Validated environment variable value.
Ensures the value contains no NUL bytes and does not exceed
ENV_VARIABLE_VALUE_MAX_LEN bytes.
Implementations§
Source§impl EnvVariableValue
impl EnvVariableValue
pub fn as_str(&self) -> &str
Sourcepub const fn from_static_or_panic(value: &'static str) -> Self
pub const fn from_static_or_panic(value: &'static str) -> Self
Validated environment variable value for 'static inputs.
§Panics
Panics at compile time when used in a const context, or at runtime otherwise,
if the value contains a NUL byte or exceeds ENV_VARIABLE_VALUE_MAX_LEN bytes.
Trait Implementations§
Source§impl AsRef<OsStr> for EnvVariableValue
impl AsRef<OsStr> for EnvVariableValue
Source§impl AsRef<str> for EnvVariableValue
impl AsRef<str> for EnvVariableValue
Source§impl Clone for EnvVariableValue
impl Clone for EnvVariableValue
Source§fn clone(&self) -> EnvVariableValue
fn clone(&self) -> EnvVariableValue
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EnvVariableValue
impl Debug for EnvVariableValue
Source§impl Display for EnvVariableValue
impl Display for EnvVariableValue
Source§impl From<&'static str> for EnvVariableValue
impl From<&'static str> for EnvVariableValue
Source§impl FromStr for EnvVariableValue
impl FromStr for EnvVariableValue
Source§impl Ord for EnvVariableValue
impl Ord for EnvVariableValue
Source§fn cmp(&self, other: &EnvVariableValue) -> Ordering
fn cmp(&self, other: &EnvVariableValue) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for EnvVariableValue
impl PartialEq for EnvVariableValue
Source§fn eq(&self, other: &EnvVariableValue) -> bool
fn eq(&self, other: &EnvVariableValue) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for EnvVariableValue
impl PartialOrd for EnvVariableValue
Source§impl TryFrom<String> for EnvVariableValue
impl TryFrom<String> for EnvVariableValue
impl Eq for EnvVariableValue
impl StructuralPartialEq for EnvVariableValue
Auto Trait Implementations§
impl Freeze for EnvVariableValue
impl RefUnwindSafe for EnvVariableValue
impl Send for EnvVariableValue
impl Sync for EnvVariableValue
impl Unpin for EnvVariableValue
impl UnsafeUnpin for EnvVariableValue
impl UnwindSafe for EnvVariableValue
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