[−][src]Struct lettre_email::Header
Represents an RFC 822 Header [unstable]
Fields
name: String
The name of this header
Methods
impl Header
[src]
impl Header
pub fn new(name: String, value: String) -> Header
[src]
pub fn new(name: String, value: String) -> Header
Creates a new Header for the given name
and value
[unstable]
pub fn new_with_value<T>(name: String, value: T) -> Result<Header, ParsingError> where
T: ToFoldedHeader,
[src]
pub fn new_with_value<T>(name: String, value: T) -> Result<Header, ParsingError> where
T: ToFoldedHeader,
Creates a new Header for the given name
and value
,
as converted through the ToHeader
or ToFoldedHeader
trait.
Returns None if the value failed to be converted. [unstable]
pub fn get_value<T>(&self) -> Result<T, ParsingError> where
T: FromHeader,
[src]
pub fn get_value<T>(&self) -> Result<T, ParsingError> where
T: FromHeader,
Get the value represented by this header, as parsed
into whichever type T
[unstable]
Trait Implementations
impl Clone for Header
[src]
impl Clone for Header
fn clone(&self) -> Header
[src]
fn clone(&self) -> Header
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Display for Header
[src]
impl Display for Header
fn fmt(&self, fmt: &mut Formatter) -> Result<(), Error>
[src]
fn fmt(&self, fmt: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl Eq for Header
[src]
impl Eq for Header
impl<S, T> From<(S, T)> for Header where
S: Into<String>,
T: Into<String>,
[src]
impl<S, T> From<(S, T)> for Header where
S: Into<String>,
T: Into<String>,
impl Hash for Header
[src]
impl Hash for Header
fn hash<__H>(&self, state: &mut __H) where
__H: Hasher,
[src]
fn hash<__H>(&self, state: &mut __H) where
__H: Hasher,
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Debug for Header
[src]
impl Debug for Header
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl PartialEq<Header> for Header
[src]
impl PartialEq<Header> for Header
fn eq(&self, other: &Header) -> bool
[src]
fn eq(&self, other: &Header) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Header) -> bool
[src]
fn ne(&self, other: &Header) -> bool
This method tests for !=
.
impl IntoHeader for Header
[src]
impl IntoHeader for Header
fn into_header(self) -> Header
[src]
fn into_header(self) -> Header
Converts to a Header
struct
Auto Trait Implementations
Blanket Implementations
impl<T> ToString for T where
T: Display + ?Sized,
[src]
impl<T> ToString for T where
T: Display + ?Sized,
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
type Owned = T
fn to_owned(&self) -> T
[src]
fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
fn clone_into(&self, target: &mut T)
[src]
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more