pub struct SinglePart { /* private fields */ }
Expand description
Single part
§Example
use lettre::message::{header, SinglePart};
let part = SinglePart::builder()
.header(header::ContentType::TEXT_PLAIN)
.body(String::from("Текст письма в уникоде"));
Implementations§
Source§impl SinglePart
impl SinglePart
Sourcepub fn builder() -> SinglePartBuilder
pub fn builder() -> SinglePartBuilder
Creates a builder for singlepart
Sourcepub fn plain<T>(body: T) -> SinglePartwhere
T: IntoBody,
pub fn plain<T>(body: T) -> SinglePartwhere
T: IntoBody,
Directly create a SinglePart
from a plain UTF-8 content
Sourcepub fn html<T>(body: T) -> SinglePartwhere
T: IntoBody,
pub fn html<T>(body: T) -> SinglePartwhere
T: IntoBody,
Directly create a SinglePart
from a UTF-8 HTML content
Trait Implementations§
Source§impl Clone for SinglePart
impl Clone for SinglePart
Source§fn clone(&self) -> SinglePart
fn clone(&self) -> SinglePart
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 moreAuto Trait Implementations§
impl Freeze for SinglePart
impl RefUnwindSafe for SinglePart
impl Send for SinglePart
impl Sync for SinglePart
impl Unpin for SinglePart
impl UnwindSafe for SinglePart
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