pub struct ApiKeyLabel(/* private fields */);Implementations§
Source§impl ApiKeyLabel
impl ApiKeyLabel
Sourcepub fn new(value: impl AsRef<str>) -> Result<Self, ApiPrimitiveError>
pub fn new(value: impl AsRef<str>) -> Result<Self, ApiPrimitiveError>
Creates validated text metadata.
§Errors
Returns ApiPrimitiveError when the value is empty or contains control characters.
Sourcepub fn into_string(self) -> String
pub fn into_string(self) -> String
Consumes the value and returns the stored text.
Trait Implementations§
Source§impl AsRef<str> for ApiKeyLabel
impl AsRef<str> for ApiKeyLabel
Source§impl Clone for ApiKeyLabel
impl Clone for ApiKeyLabel
Source§fn clone(&self) -> ApiKeyLabel
fn clone(&self) -> ApiKeyLabel
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 ApiKeyLabel
impl Debug for ApiKeyLabel
Source§impl Display for ApiKeyLabel
impl Display for ApiKeyLabel
Source§impl FromStr for ApiKeyLabel
impl FromStr for ApiKeyLabel
Source§impl Hash for ApiKeyLabel
impl Hash for ApiKeyLabel
Source§impl Ord for ApiKeyLabel
impl Ord for ApiKeyLabel
Source§fn cmp(&self, other: &ApiKeyLabel) -> Ordering
fn cmp(&self, other: &ApiKeyLabel) -> 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 ApiKeyLabel
impl PartialEq for ApiKeyLabel
Source§fn eq(&self, other: &ApiKeyLabel) -> bool
fn eq(&self, other: &ApiKeyLabel) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for ApiKeyLabel
impl PartialOrd for ApiKeyLabel
Source§impl TryFrom<&str> for ApiKeyLabel
impl TryFrom<&str> for ApiKeyLabel
impl Eq for ApiKeyLabel
impl StructuralPartialEq for ApiKeyLabel
Auto Trait Implementations§
impl Freeze for ApiKeyLabel
impl RefUnwindSafe for ApiKeyLabel
impl Send for ApiKeyLabel
impl Sync for ApiKeyLabel
impl Unpin for ApiKeyLabel
impl UnsafeUnpin for ApiKeyLabel
impl UnwindSafe for ApiKeyLabel
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