Struct lettre_email::Header
[−]
[src]
pub struct Header { pub name: String, // some fields omitted }
Represents an RFC 822 Header [unstable]
Fields
name: String
The name of this header
Methods
impl Header
[src]
pub fn new(name: String, value: String) -> Header
[src]
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]
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]
T: FromHeader,
Get the value represented by this header, as parsed
into whichever type T
[unstable]
Trait Implementations
impl Display for Header
[src]
fn fmt(&self, fmt: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter. Read more
impl Hash for Header
[src]
fn hash<__H>(&self, __arg_0: &mut __H) where
__H: Hasher,
[src]
__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]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Eq for Header
[src]
impl PartialEq<Header> for Header
[src]
fn eq(&self, __arg_0: &Header) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Header) -> bool
[src]
This method tests for !=
.
impl Clone for Header
[src]
fn clone(&self) -> Header
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for Header
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter. Read more
impl IntoHeader for Header
[src]
fn into_header(self) -> Header
[src]
Converts to a Header
struct