pub struct ApiResourceName(/* private fields */);Implementations§
Source§impl ApiResourceName
impl ApiResourceName
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 ApiResourceName
impl AsRef<str> for ApiResourceName
Source§impl Clone for ApiResourceName
impl Clone for ApiResourceName
Source§fn clone(&self) -> ApiResourceName
fn clone(&self) -> ApiResourceName
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 ApiResourceName
impl Debug for ApiResourceName
Source§impl Display for ApiResourceName
impl Display for ApiResourceName
Source§impl FromStr for ApiResourceName
impl FromStr for ApiResourceName
Source§impl Hash for ApiResourceName
impl Hash for ApiResourceName
Source§impl Ord for ApiResourceName
impl Ord for ApiResourceName
Source§fn cmp(&self, other: &ApiResourceName) -> Ordering
fn cmp(&self, other: &ApiResourceName) -> 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 ApiResourceName
impl PartialEq for ApiResourceName
Source§fn eq(&self, other: &ApiResourceName) -> bool
fn eq(&self, other: &ApiResourceName) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for ApiResourceName
impl PartialOrd for ApiResourceName
Source§impl TryFrom<&str> for ApiResourceName
impl TryFrom<&str> for ApiResourceName
impl Eq for ApiResourceName
impl StructuralPartialEq for ApiResourceName
Auto Trait Implementations§
impl Freeze for ApiResourceName
impl RefUnwindSafe for ApiResourceName
impl Send for ApiResourceName
impl Sync for ApiResourceName
impl Unpin for ApiResourceName
impl UnsafeUnpin for ApiResourceName
impl UnwindSafe for ApiResourceName
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