Trait gmime::AutocryptHeaderExt[][src]

pub trait AutocryptHeaderExt {
    fn clone(&self, src: &AutocryptHeader);
fn get_address(&self) -> Option<InternetAddressMailbox>;
fn get_address_as_string(&self) -> Option<String>;
fn get_effective_date(&self) -> Option<DateTime>;
fn get_keydata(&self) -> Option<Bytes>;
fn get_prefer_encrypt(&self) -> AutocryptPreferEncrypt;
fn is_complete(&self) -> bool;
fn set_address(&self, address: &InternetAddressMailbox);
fn set_address_from_string(&self, address: &str);
fn set_effective_date(&self, effective_date: &DateTime);
fn set_keydata(&self, data: &Bytes);
fn set_prefer_encrypt(&self, pref: AutocryptPreferEncrypt);
fn to_string(&self, gossip: bool) -> String; }

Trait containing all AutocryptHeader methods.

Implementors

AutocryptHeader

Required Methods

If address and type already match between src and self, copy keydata, prefer_encrypt, effective_date from src to self.

src

a AutocryptHeader object

Gets the internal address of the Autocrypt header, or None if not set.

Returns

the address associated with the Autocrypt header

Gets the internal address of the Autocrypt header as a C string, or None if not set.

Returns

the address associated with the Autocrypt header

Gets the effective date of the Autocrypt header, or None if not set.

Returns

the effective date associated with the Autocrypt header

Gets the raw keydata of the Autocrypt header, or None if not set.

Returns

the raw key data associated with the Autocrypt header

Gets the encryption preference stated by the Autocrypt header.

Returns

the encryption preference associated with the Autocrypt header

When dealing with Autocrypt headers derived from a message, some sender addresses will not have a legitimate/complete header associated with them. When a given sender address has no complete header of a specific type, it should "reset" the state of the associated address.

Returns

true if the header is complete, or false if it is incomplete.

Set the address associated with the autocrypt_header.

address

a InternetAddressMailbox value

Set the address associated with the autocrypt_header.

address

a None-terminated string that is a raw e-mail address

Set the effective date associated with the Autocrypt header.

effective_date

a glib::DateTime object

Set the raw key data associated with the Autocrypt header.

Set the encryption preference associated with the Autocrypt header.

pref

a AutocryptPreferEncrypt value

Gets the string representation of the Autocrypt header, or None on error. For example, it might return:

prefer-encrypt=mutual; addr=bob@example.com; keydata=AAAB15BE...

If you are using this object to populate an Autocrypt-Gossip header, you should set gossip to true (this will suppress inclusion of prefer-encrypt).

gossip

a gboolean, indicating whether this header is for use with gossip

Returns

the string representation of the Autocrypt header.

Implementors