Trait gmime::HeaderExt [−][src]
pub trait HeaderExt { fn format_addrlist<'a, P: Into<Option<&'a FormatOptions>>>(
&self,
options: P,
value: &str,
charset: &str
) -> Option<String>; fn format_content_disposition<'a, P: Into<Option<&'a FormatOptions>>>(
&self,
options: P,
value: &str,
charset: &str
) -> Option<String>; fn format_content_type<'a, P: Into<Option<&'a FormatOptions>>>(
&self,
options: P,
value: &str,
charset: &str
) -> Option<String>; fn format_default<'a, P: Into<Option<&'a FormatOptions>>>(
&self,
options: P,
value: &str,
charset: &str
) -> Option<String>; fn format_message_id<'a, P: Into<Option<&'a FormatOptions>>>(
&self,
options: P,
value: &str,
charset: &str
) -> Option<String>; fn format_received<'a, P: Into<Option<&'a FormatOptions>>>(
&self,
options: P,
value: &str,
charset: &str
) -> Option<String>; fn format_references<'a, P: Into<Option<&'a FormatOptions>>>(
&self,
options: P,
value: &str,
charset: &str
) -> Option<String>; fn get_name(&self) -> Option<String>; fn get_offset(&self) -> i64; fn get_raw_name(&self) -> Option<String>; fn get_raw_value(&self) -> Option<String>; fn get_value(&self) -> Option<String>; fn set_raw_value(&self, raw_value: &str); fn set_value<'a, P: Into<Option<&'a FormatOptions>>>(
&self,
options: P,
value: &str,
charset: &str
); fn write_to_stream<'a, P: Into<Option<&'a FormatOptions>>, Q: IsA<Stream>>(
&self,
options: P,
stream: &Q
) -> isize; }
Required Methods
fn format_addrlist<'a, P: Into<Option<&'a FormatOptions>>>(
&self,
options: P,
value: &str,
charset: &str
) -> Option<String>
&self,
options: P,
value: &str,
charset: &str
) -> Option<String>
Parses the value
and then re-formats it to conform to the formatting options,
folding the value if necessary.
options
a FormatOptions
or None
value
a Sender, From, Reply-To, To, Cc, or Bcc header value
charset
a charset (note: unused)
Returns
a newly allocated string containing the reformatted value.
fn format_content_disposition<'a, P: Into<Option<&'a FormatOptions>>>(
&self,
options: P,
value: &str,
charset: &str
) -> Option<String>
&self,
options: P,
value: &str,
charset: &str
) -> Option<String>
Parses the value
and then re-formats it to conform to the formatting options,
folding the value if necessary.
options
a FormatOptions
or None
value
a Content-Disposition header value
charset
a charset (note: unused)
Returns
a newly allocated string containing the reformatted value.
fn format_content_type<'a, P: Into<Option<&'a FormatOptions>>>(
&self,
options: P,
value: &str,
charset: &str
) -> Option<String>
&self,
options: P,
value: &str,
charset: &str
) -> Option<String>
Parses the value
and then re-formats it to conform to the formatting options,
folding the value if necessary.
options
a FormatOptions
or None
value
a Content-Type header value
charset
a charset (note: unused)
Returns
a newly allocated string containing the reformatted value.
fn format_default<'a, P: Into<Option<&'a FormatOptions>>>(
&self,
options: P,
value: &str,
charset: &str
) -> Option<String>
&self,
options: P,
value: &str,
charset: &str
) -> Option<String>
Parses the value
and then re-formats it to conform to the formatting options,
folding the value if necessary.
options
a FormatOptions
or None
value
a header value
charset
a charset to use when encoding the value
Returns
a newly allocated string containing the reformatted value.
fn format_message_id<'a, P: Into<Option<&'a FormatOptions>>>(
&self,
options: P,
value: &str,
charset: &str
) -> Option<String>
&self,
options: P,
value: &str,
charset: &str
) -> Option<String>
Parses the value
and then re-formats it to conform to the formatting options,
folding the value if necessary.
options
a FormatOptions
or None
value
a Message-Id or Content-Id header value
charset
a charset (note: unused)
Returns
a newly allocated string containing the reformatted value.
fn format_received<'a, P: Into<Option<&'a FormatOptions>>>(
&self,
options: P,
value: &str,
charset: &str
) -> Option<String>
&self,
options: P,
value: &str,
charset: &str
) -> Option<String>
Parses the value
and then re-formats it to conform to the formatting options,
folding the value if necessary.
options
a FormatOptions
or None
value
a Received header value
charset
a charset (note: unused)
Returns
a newly allocated string containing the reformatted value.
fn format_references<'a, P: Into<Option<&'a FormatOptions>>>(
&self,
options: P,
value: &str,
charset: &str
) -> Option<String>
&self,
options: P,
value: &str,
charset: &str
) -> Option<String>
Parses the value
and then re-formats it to conform to the formatting options,
folding the value if necessary.
options
a FormatOptions
or None
value
a References or In-Reply-To header value
charset
a charset (note: unused)
Returns
a newly allocated string containing the reformatted value.
fn get_name(&self) -> Option<String>
fn get_offset(&self) -> i64
fn get_raw_name(&self) -> Option<String>
Gets the header's raw name. The raw header name is the complete string up to
(but not including) the ':' separating the header's name from its value. This
string may be different from the value returned by HeaderExt::get_name
if the parsed message's header contained trailing whitespace after the header
name, such as: "Subject : this is the subject\r\n".
Returns
the raw header name.
fn get_raw_value(&self) -> Option<String>
fn get_value(&self) -> Option<String>
fn set_raw_value(&self, raw_value: &str)
fn set_value<'a, P: Into<Option<&'a FormatOptions>>>(
&self,
options: P,
value: &str,
charset: &str
)
&self,
options: P,
value: &str,
charset: &str
)
Sets the header's decoded value.
options
a FormatOptions
or None
value
the new header value
charset
a charset
fn write_to_stream<'a, P: Into<Option<&'a FormatOptions>>, Q: IsA<Stream>>(
&self,
options: P,
stream: &Q
) -> isize
&self,
options: P,
stream: &Q
) -> isize
Implementors
impl<O: IsA<Header>> HeaderExt for O