pub struct CredentialName(/* private fields */);Expand description
The name of an environment variable a credential arrives under.
A newtype rather than a String because the domain is real and narrow — what a
shell could have exported — and a report naming something outside it would be
reporting a credential that no layer could ever resolve. CredentialName::new is
the only way to make one, so that report cannot be built.
Implementations§
Trait Implementations§
Source§impl Borrow<str> for CredentialName
impl Borrow<str> for CredentialName
Source§impl Clone for CredentialName
impl Clone for CredentialName
Source§fn clone(&self) -> CredentialName
fn clone(&self) -> CredentialName
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 CredentialName
impl Debug for CredentialName
Source§impl<'de> Deserialize<'de> for CredentialName
impl<'de> Deserialize<'de> for CredentialName
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 CredentialName
impl Display for CredentialName
impl Eq for CredentialName
Source§impl From<CredentialName> for String
impl From<CredentialName> for String
Source§fn from(value: CredentialName) -> Self
fn from(value: CredentialName) -> Self
Converts to this type from the input type.
Source§impl Hash for CredentialName
impl Hash for CredentialName
Source§impl JsonSchema for CredentialName
impl JsonSchema for CredentialName
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl Ord for CredentialName
impl Ord for CredentialName
Source§fn cmp(&self, other: &CredentialName) -> Ordering
fn cmp(&self, other: &CredentialName) -> 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
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 CredentialName
impl PartialEq for CredentialName
Source§impl PartialOrd for CredentialName
impl PartialOrd for CredentialName
Source§impl Serialize for CredentialName
impl Serialize for CredentialName
impl StructuralPartialEq for CredentialName
Source§impl TryFrom<String> for CredentialName
impl TryFrom<String> for CredentialName
Source§fn try_from(value: String) -> Result<Self, Self::Error>
fn try_from(value: String) -> Result<Self, Self::Error>
Read a name a shell could have exported, and refuse anything else where it is written.
This is what lets a configuration field hold the type rather than a String it
checks later: a name no layer could ever resolve stops being representable at all,
instead of surfacing as a credential mysteriously reported absent.
Auto Trait Implementations§
impl Freeze for CredentialName
impl RefUnwindSafe for CredentialName
impl Send for CredentialName
impl Sync for CredentialName
impl Unpin for CredentialName
impl UnsafeUnpin for CredentialName
impl UnwindSafe for CredentialName
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.