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