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