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; }

Trait containing all InternetAddress methods.

Implementors

InternetAddressMailbox, InternetAddress

Required Methods

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.

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.

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

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

Allocates a string containing the contents of the InternetAddress object.

options

a FormatOptions or None

encode

true if the address should be rfc2047 encoded

Returns

the InternetAddress object as an allocated string in rfc822 format.

Implementors