pub struct FormatType(/* private fields */);Expand description
A media type/subtype pair (RFC 5545 §3.2.8, FMTTYPE parameter).
Format: type/subtype (e.g. text/plain, image/png).
Implementations§
Source§impl FormatType
impl FormatType
pub fn new(input: &str) -> Result<&Self, InvalidFormatTypeError>
Trait Implementations§
Source§impl AsMut<FormatType> for FormatTypeBuf
impl AsMut<FormatType> for FormatTypeBuf
Source§fn as_mut(&mut self) -> &mut FormatType
fn as_mut(&mut self) -> &mut FormatType
Converts this type into a mutable reference of the (usually inferred) input type.
Source§impl AsRef<FormatType> for FormatTypeBuf
impl AsRef<FormatType> for FormatTypeBuf
Source§fn as_ref(&self) -> &FormatType
fn as_ref(&self) -> &FormatType
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Borrow<FormatType> for FormatTypeBuf
impl Borrow<FormatType> for FormatTypeBuf
Source§fn borrow(&self) -> &FormatType
fn borrow(&self) -> &FormatType
Immutably borrows from an owned value. Read more
Source§impl Clone for Box<FormatType>
impl Clone for Box<FormatType>
Source§impl Debug for FormatType
impl Debug for FormatType
Source§impl Display for FormatType
impl Display for FormatType
Source§impl From<&FormatType> for Box<FormatType>
impl From<&FormatType> for Box<FormatType>
Source§fn from(value: &FormatType) -> Self
fn from(value: &FormatType) -> Self
Converts to this type from the input type.
Source§impl From<&FormatType> for FormatTypeBuf
impl From<&FormatType> for FormatTypeBuf
Source§fn from(value: &FormatType) -> Self
fn from(value: &FormatType) -> Self
Converts to this type from the input type.
Source§impl From<&mut FormatType> for Box<FormatType>
impl From<&mut FormatType> for Box<FormatType>
Source§fn from(value: &mut FormatType) -> Self
fn from(value: &mut FormatType) -> Self
Converts to this type from the input type.
Source§impl From<&mut FormatType> for FormatTypeBuf
impl From<&mut FormatType> for FormatTypeBuf
Source§fn from(value: &mut FormatType) -> Self
fn from(value: &mut FormatType) -> Self
Converts to this type from the input type.
Source§impl From<FormatTypeBuf> for Box<FormatType>
impl From<FormatTypeBuf> for Box<FormatType>
Source§fn from(value: FormatTypeBuf) -> Self
fn from(value: FormatTypeBuf) -> Self
Converts to this type from the input type.
Source§impl Hash for FormatType
impl Hash for FormatType
Source§impl Ord for FormatType
impl Ord for FormatType
Source§impl PartialEq for FormatType
impl PartialEq for FormatType
Source§impl PartialOrd for FormatType
impl PartialOrd for FormatType
Source§impl ToOwned for FormatType
impl ToOwned for FormatType
Source§type Owned = FormatTypeBuf
type Owned = FormatTypeBuf
The resulting type after obtaining ownership.
Source§fn to_owned(&self) -> Self::Owned
fn to_owned(&self) -> Self::Owned
Creates owned data from borrowed data, usually by cloning. Read more
1.63.0 · Source§fn clone_into(&self, target: &mut Self::Owned)
fn clone_into(&self, target: &mut Self::Owned)
Uses borrowed data to replace owned data, usually by cloning. Read more