Struct Name
pub struct Name<'a> { /* private fields */ }
A section of a Mime.
For instance, for the Mime image/svg+xml, it contains 3 Names,
image, svg, and xml.
In most cases, Names are compared ignoring case.
Implementations
impl<'a> Name<'a>
fn as_str(&self) -> &'a strGet the value of this
Nameas a string.Note that the borrow is not tied to
&selfbut the'alifetime, allowing the string to outliveName. Alternately, there is animpl<'a> From<Name<'a>> for &'a strwhich isn't rendered by Rustdoc, that can be accessed usingstr::from(name)orname.into().
Trait Implementations
impl<'a> AsRef<str> for Name<'a>
fn as_ref(&self) -> &str
impl<'a> Clone for Name<'a>
fn clone(&self) -> Self
impl<'a> Copy for Name<'a>
impl<'a> Debug for Name<'a>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<'a> Display for Name<'a>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<'a> Eq for Name<'a>
impl<'a> Hash for Name<'a>
fn hash<__H: Hasher>(&self, state: &mut __H)
impl<'a> Ord for Name<'a>
fn cmp(&self, other: &Self) -> Ordering
impl<'a> PartialEq for Name<'a>
fn eq(&self, other: &Self) -> bool
impl<'a> PartialOrd for Name<'a>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
impl<'a> StructuralPartialEq for Name<'a>
impl<'a, 'b> PartialEq<&'b str> for Name<'a>
fn eq(&self, other: &&'b str) -> bool