pub struct MediaTypeSuffix(/* private fields */);Implementations§
Source§impl MediaTypeSuffix
impl MediaTypeSuffix
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 MediaTypeSuffix
impl AsRef<str> for MediaTypeSuffix
Source§impl Clone for MediaTypeSuffix
impl Clone for MediaTypeSuffix
Source§fn clone(&self) -> MediaTypeSuffix
fn clone(&self) -> MediaTypeSuffix
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 MediaTypeSuffix
impl Debug for MediaTypeSuffix
Source§impl Display for MediaTypeSuffix
impl Display for MediaTypeSuffix
impl Eq for MediaTypeSuffix
Source§impl FromStr for MediaTypeSuffix
impl FromStr for MediaTypeSuffix
Source§impl Hash for MediaTypeSuffix
impl Hash for MediaTypeSuffix
Source§impl Ord for MediaTypeSuffix
impl Ord for MediaTypeSuffix
Source§fn cmp(&self, other: &MediaTypeSuffix) -> Ordering
fn cmp(&self, other: &MediaTypeSuffix) -> 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 MediaTypeSuffix
impl PartialEq for MediaTypeSuffix
Source§impl PartialOrd for MediaTypeSuffix
impl PartialOrd for MediaTypeSuffix
impl StructuralPartialEq for MediaTypeSuffix
Auto Trait Implementations§
impl Freeze for MediaTypeSuffix
impl RefUnwindSafe for MediaTypeSuffix
impl Send for MediaTypeSuffix
impl Sync for MediaTypeSuffix
impl Unpin for MediaTypeSuffix
impl UnsafeUnpin for MediaTypeSuffix
impl UnwindSafe for MediaTypeSuffix
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