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); }
Required Methods
fn encode<'a, P: Into<Option<&'a FormatOptions>>>(
&self,
options: P
) -> Option<String>
&self,
options: P
) -> Option<String>
Encodes the Content-Disposition header.
options
a FormatOptions
or None
Returns
a new string containing the encoded header value.
fn get_disposition(&self) -> Option<String>
Gets the disposition or None
on fail.
Returns
the disposition string which is probably one of
GMIME_DISPOSITION_ATTACHMENT
or GMIME_DISPOSITION_INLINE
.
fn get_parameter(&self, name: &str) -> Option<String>
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.
fn get_parameters(&self) -> Option<ParamList>
fn is_attachment(&self) -> bool
Determines if a Content-Disposition has a value of "attachment".
Returns
true
if the value matches "attachment", otherwise false
.
fn set_disposition(&self, value: &str)
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
fn set_parameter(&self, name: &str, value: &str)
Implementors
impl<O: IsA<ContentDisposition>> ContentDispositionExt for O