Trait gmime::ContentDispositionExt[][src]

pub trait ContentDispositionExt {
    fn encode<'a, P: Into<Option<&'a FormatOptions>>>(
        &self,
        options: P
    ) -> Option<String>;
fn get_disposition(&self) -> Option<String>;
fn get_parameter(&self, name: &str) -> Option<String>;
fn get_parameters(&self) -> Option<ParamList>;
fn is_attachment(&self) -> bool;
fn set_disposition(&self, value: &str);
fn set_parameter(&self, name: &str, value: &str); }

Trait containing all ContentDisposition methods.

Implementors

ContentDisposition

Required Methods

Encodes the Content-Disposition header.

options

a FormatOptions or None

Returns

a new string containing the encoded header value.

Gets the disposition or None on fail.

Returns

the disposition string which is probably one of GMIME_DISPOSITION_ATTACHMENT or GMIME_DISPOSITION_INLINE.

Gets the parameter value specified by name if it's available.

name

parameter name

Returns

the value of the requested parameter or None if the parameter is not set. If the parameter is set, the returned string will be in UTF-8.

Gets the Content-Disposition parameter list.

Returns

the Content-Disposition's parameter list.

Determines if a Content-Disposition has a value of "attachment".

Returns

true if the value matches "attachment", otherwise false.

Sets the disposition to value which may be one of GMIME_DISPOSITION_ATTACHMENT or GMIME_DISPOSITION_INLINE or, by your choice, any other string which would indicate how the MIME part should be displayed by the MUA.

value

disposition value

Sets a parameter on the Content-Disposition.

Note: The name should be in US-ASCII while the value should be in UTF-8.

name

parameter name

value

parameter value

Implementors