pub struct EnvVarName(/* private fields */);Expand description
One environment variable name a scope declares its runs may inherit.
A String would put the judgement in whichever caller remembered it.
This has one constructor, and that constructor is reached where a
configuration file is read — which is the only moment the refusal is
still worth anything, because a name handed to a child process is a
name the child cannot be asked to forget.
Implementations§
Source§impl EnvVarName
impl EnvVarName
Sourcepub fn parse(raw: &str) -> Result<EnvVarName, AxError>
pub fn parse(raw: &str) -> Result<EnvVarName, AxError>
Sole constructor.
§Errors
Refuses an empty name, a name carrying the = that separates a
name from a value, a name carrying a control character, and a
name crate::secret::names_a_credential reads as a credential.
pub fn as_str(&self) -> &str
Trait Implementations§
Source§impl Clone for EnvVarName
impl Clone for EnvVarName
Source§impl Debug for EnvVarName
impl Debug for EnvVarName
Source§impl<'de> Deserialize<'de> for EnvVarName
impl<'de> Deserialize<'de> for EnvVarName
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for EnvVarName
impl Display for EnvVarName
impl Eq for EnvVarName
Source§impl From<EnvVarName> for String
impl From<EnvVarName> for String
Source§fn from(name: EnvVarName) -> String
fn from(name: EnvVarName) -> String
Converts to this type from the input type.
Source§impl Ord for EnvVarName
impl Ord for EnvVarName
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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for EnvVarName
impl PartialEq for EnvVarName
Source§impl PartialOrd for EnvVarName
impl PartialOrd for EnvVarName
Source§impl Serialize for EnvVarName
impl Serialize for EnvVarName
impl StructuralPartialEq for EnvVarName
Auto Trait Implementations§
impl Freeze 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