pub struct MimeVersion(/* private fields */);Expand description
Lightweight MIME-Version header wrapper.
Implementations§
Source§impl MimeVersion
impl MimeVersion
Sourcepub fn new(value: impl AsRef<str>) -> Result<MimeVersion, HeaderParseError>
pub fn new(value: impl AsRef<str>) -> Result<MimeVersion, HeaderParseError>
Creates a typed header wrapper.
Sourcepub const fn value(&self) -> &HeaderValue
pub const fn value(&self) -> &HeaderValue
Returns the header value.
Sourcepub fn field(&self) -> HeaderField
pub fn field(&self) -> HeaderField
Converts this wrapper into a header field.
Trait Implementations§
Source§impl Clone for MimeVersion
impl Clone for MimeVersion
Source§fn clone(&self) -> MimeVersion
fn clone(&self) -> MimeVersion
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 MimeVersion
impl Debug for MimeVersion
Source§impl Display for MimeVersion
impl Display for MimeVersion
Source§impl Hash for MimeVersion
impl Hash for MimeVersion
Source§impl Ord for MimeVersion
impl Ord for MimeVersion
Source§fn cmp(&self, other: &MimeVersion) -> Ordering
fn cmp(&self, other: &MimeVersion) -> 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 MimeVersion
impl PartialEq for MimeVersion
Source§fn eq(&self, other: &MimeVersion) -> bool
fn eq(&self, other: &MimeVersion) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for MimeVersion
impl PartialOrd for MimeVersion
impl Eq for MimeVersion
impl StructuralPartialEq for MimeVersion
Auto Trait Implementations§
impl Freeze for MimeVersion
impl RefUnwindSafe for MimeVersion
impl Send for MimeVersion
impl Sync for MimeVersion
impl Unpin for MimeVersion
impl UnsafeUnpin for MimeVersion
impl UnwindSafe for MimeVersion
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