Trait gmime::InternetAddressListExt[][src]

pub trait InternetAddressListExt {
    fn add<P: IsA<InternetAddress>>(&self, ia: &P) -> i32;
fn append(&self, append: &InternetAddressList);
fn clear(&self);
fn contains<P: IsA<InternetAddress>>(&self, ia: &P) -> bool;
fn get_address(&self, index: i32) -> Option<InternetAddress>;
fn index_of<P: IsA<InternetAddress>>(&self, ia: &P) -> i32;
fn insert<P: IsA<InternetAddress>>(&self, index: i32, ia: &P);
fn length(&self) -> i32;
fn prepend(&self, prepend: &InternetAddressList);
fn remove<P: IsA<InternetAddress>>(&self, ia: &P) -> bool;
fn remove_at(&self, index: i32) -> bool;
fn set_address<P: IsA<InternetAddress>>(&self, index: i32, ia: &P);
fn to_string<'a, P: Into<Option<&'a FormatOptions>>>(
        &self,
        options: P,
        encode: bool
    ) -> String; }
[]

Trait containing all InternetAddressList methods.

Implementors

InternetAddressList

Required Methods

[]

Adds an InternetAddress to the InternetAddressList.

ia

a InternetAddress

Returns

the index of the added InternetAddress.

[]

Adds all of the addresses in append to self.

append

a InternetAddressList

[]

Clears the list of addresses.

[]

Checks whether or not the specified InternetAddress is contained within the InternetAddressList.

ia

a InternetAddress

Returns

true if the specified InternetAddress is contained within the specified InternetAddressList or false otherwise.

[]

Gets the InternetAddress at the specified index.

index

index of InternetAddress to get

Returns

the InternetAddress at the specified index or None if the index is out of range.

[]

Gets the index of the specified InternetAddress inside the InternetAddressList.

ia

a InternetAddress

Returns

the index of the requested InternetAddress within the InternetAddressList or %-1 if it is not contained within the InternetAddressList.

[]

Inserts an InternetAddress into the InternetAddressList at the specified index.

index

index to insert at

ia

a InternetAddress

[]

Gets the length of the list.

Returns

the number of InternetAddress objects in the list.

[]

Inserts all of the addresses in prepend to the beginning of self.

prepend

a InternetAddressList

[]

Removes an InternetAddress from the InternetAddressList.

ia

a InternetAddress

Returns

true if the specified InternetAddress was removed or false otherwise.

[]

Removes an InternetAddress from the InternetAddressList at the specified index.

index

index to remove

Returns

true if an InternetAddress was removed or false otherwise.

[]

Sets the InternetAddress at the specified index to ia.

index

index of InternetAddress to set

ia

a InternetAddress

[]

Allocates a string buffer containing the rfc822 formatted addresses in self.

options

a FormatOptions or None

encode

true if the address should be rfc2047 encoded

Returns

a string containing the list of addresses in rfc822 format or None if no addresses are contained in the list.

Implementors