pub struct Identifier(/* private fields */);Expand description
Identifier text with a tight byte cap and ASCII policy.
Implementations§
Source§impl Identifier
impl Identifier
Sourcepub fn new(value: impl Into<String>) -> Result<Self, ConfigError>
pub fn new(value: impl Into<String>) -> Result<Self, ConfigError>
Creates an identifier from ASCII alphanumeric, dash, underscore, dot, and colon characters.
§Errors
Returns ConfigError if the identifier is empty, too long, or contains
characters outside the allowlist.
Trait Implementations§
Source§impl Clone for Identifier
impl Clone for Identifier
Source§fn clone(&self) -> Identifier
fn clone(&self) -> Identifier
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 Identifier
impl Debug for Identifier
Source§impl<'de> Deserialize<'de> for Identifier
impl<'de> Deserialize<'de> for Identifier
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 From<Identifier> for String
impl From<Identifier> for String
Source§fn from(value: Identifier) -> Self
fn from(value: Identifier) -> Self
Converts to this type from the input type.
Source§impl Hash for Identifier
impl Hash for Identifier
Source§impl Ord for Identifier
impl Ord for Identifier
Source§fn cmp(&self, other: &Identifier) -> Ordering
fn cmp(&self, other: &Identifier) -> 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 Identifier
impl PartialEq for Identifier
Source§fn eq(&self, other: &Identifier) -> bool
fn eq(&self, other: &Identifier) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for Identifier
impl PartialOrd for Identifier
Source§impl Serialize for Identifier
impl Serialize for Identifier
Source§impl TryFrom<String> for Identifier
impl TryFrom<String> for Identifier
impl Eq for Identifier
impl StructuralPartialEq for Identifier
Auto Trait Implementations§
impl Freeze for Identifier
impl RefUnwindSafe for Identifier
impl Send for Identifier
impl Sync for Identifier
impl Unpin for Identifier
impl UnsafeUnpin for Identifier
impl UnwindSafe for Identifier
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