Struct 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]
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: ToFoldedHeader>(
name: String,
value: T
) -> ParsingResult<Header>
[src]
pub fn new_with_value<T: ToFoldedHeader>(
name: String,
value: T
) -> ParsingResult<Header>
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: FromHeader>(&self) -> ParsingResult<T>
[src]
pub fn get_value<T: FromHeader>(&self) -> ParsingResult<T>
Get the value represented by this header, as parsed
into whichever type T
[unstable]
Trait Implementations
impl PartialEq for Header
[src]
impl PartialEq 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 Eq for Header
[src]
impl Eq for Header
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)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Debug for Header
[src]
impl Debug for Header
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Hash for Header
[src]
impl Hash for Header
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
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,
1.3.0
[src]Feeds a slice of this type into the given [Hasher
]. Read more
impl<S: Into<String>, T: Into<String>> From<(S, T)> for Header
[src]
impl<S: Into<String>, T: Into<String>> From<(S, T)> for Header
impl Display for Header
[src]
impl Display for Header