Struct lettre::message::header::ContentType
source · pub struct ContentType(_);
Available on crate feature
builder
only.Expand description
Content-Type
of the body
This struct can represent any valid mime type, which can be parsed via
ContentType::parse
. Constants are provided for the most-used mime-types.
Defined in RFC2045
Implementations§
source§impl ContentType
impl ContentType
sourcepub const TEXT_PLAIN: ContentType = _
pub const TEXT_PLAIN: ContentType = _
A ContentType
of type text/plain; charset=utf-8
Indicates that the body is in utf-8 encoded plain text.
sourcepub const TEXT_HTML: ContentType = _
pub const TEXT_HTML: ContentType = _
A ContentType
of type text/html; charset=utf-8
Indicates that the body is in utf-8 encoded html.
sourcepub fn parse(s: &str) -> Result<ContentType, ContentTypeErr>
pub fn parse(s: &str) -> Result<ContentType, ContentTypeErr>
Parse s
into ContentType
Trait Implementations§
source§impl Clone for ContentType
impl Clone for ContentType
source§fn clone(&self) -> ContentType
fn clone(&self) -> ContentType
Returns a copy of the value. Read more
1.0.0 · 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 ContentType
impl Debug for ContentType
source§impl<'de> Deserialize<'de> for ContentType
impl<'de> Deserialize<'de> for ContentType
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<Mime> for ContentType
Available on crate feature mime03
only.
impl From<Mime> for ContentType
Available on crate feature
mime03
only.source§impl FromStr for ContentType
impl FromStr for ContentType
source§impl Header for ContentType
impl Header for ContentType
source§impl PartialEq<ContentType> for ContentType
impl PartialEq<ContentType> for ContentType
source§fn eq(&self, other: &ContentType) -> bool
fn eq(&self, other: &ContentType) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.