Trait gmime::InternetAddressExt [−][src]
pub trait InternetAddressExt { fn get_charset(&self) -> Option<String>; fn get_name(&self) -> Option<String>; fn set_charset<'a, P: Into<Option<&'a str>>>(&self, charset: P); fn set_name(&self, name: &str); fn to_string<'a, P: Into<Option<&'a FormatOptions>>>(
&self,
options: P,
encode: bool
) -> String; }
Required Methods
fn get_charset(&self) -> Option<String>
Gets the charset to be used when encoding the name of the mailbox or group.
Returns
the charset to be used when encoding the name of the
mailbox or group if available or None
otherwise.
fn get_name(&self) -> Option<String>
Gets the display name of the InternetAddress
.
Returns
the name of the mailbox or group in a form suitable
for display if available or None
otherwise. If the name is available,
the returned string will be in UTF-8.
fn set_charset<'a, P: Into<Option<&'a str>>>(&self, charset: P)
Set the charset to use for encoding the name of the mailbox or group.
charset
the charset to use when encoding the name or None
to use the defaults
fn set_name(&self, name: &str)
Set the display name of the InternetAddress
.
Note: The name
string should be in UTF-8.
name
the display name for the address group or mailbox
fn to_string<'a, P: Into<Option<&'a FormatOptions>>>(
&self,
options: P,
encode: bool
) -> String
&self,
options: P,
encode: bool
) -> String
Implementors
impl<O: IsA<InternetAddress>> InternetAddressExt for O