/// Helper method to parse a header value as a Content-Disposition header. The disposition
/// defaults to "inline" if no disposition parameter is provided in the header
/// value.
///
/// # Examples
/// ```
///     use mailparse::{parse_header, parse_content_disposition, DispositionType};
///     let (parsed, _) = parse_header(
///             b"Content-Disposition: attachment; filename=\"yummy dummy\"")
///         .unwrap();
///     let dis = parse_content_disposition(&parsed.get_value().unwrap());
///     assert_eq!(dis.disposition, DispositionType::Attachment);
///     assert_eq!(dis.params.get("name"), None);
///     assert_eq!(dis.params.get("filename"), Some(&"yummy dummy".to_string()));
/// ```
Helper method to parse a header value as a Content-Disposition header. The disposition
defaults to "inline" if no disposition parameter is provided in the header
value.
Helper method to parse a header value as a Content - Disposition header . The disposition defaults to " inline " if no disposition parameter is provided in the header value .
pub fn parse_content_disposition(header: &str) -> ParsedContentDisposition {
    let params = parse_param_content(header);
    let disposition = parse_disposition_type(&params.value);
    ParsedContentDisposition {
        disposition,
        params: params.params,
    }
}
pub fn parse_content_disposition ( header : & str ) -> ParsedContentDisposition { let params = parse_param_content ( header ) ; let disposition = parse_disposition_type ( & params . value ) ; ParsedContentDisposition { disposition , params : params . params , } }
Helper method to parse a header value as a Content-Disposition header.
Helper method to parse a header value as a Content - Disposition header .
header
&str
examples
```
use mailparse::{parse_header, parse_content_disposition, DispositionType};
let (parsed, _) = parse_header(
b"Content-Disposition: attachment; filename=\"yummy dummy\"")
.unwrap();
let dis = parse_content_disposition(&parsed.get_value().unwrap());
assert_eq!(dis.disposition, DispositionType::Attachment);
assert_eq!(dis.params.get("name"), None);
assert_eq!(dis.params.get("filename"), Some(&"yummy dummy".to_string()));
```
` ` ` use mailparse :: { parse_header parse_content_disposition DispositionType } ; let ( parsed _ ) = parse_header ( b " Content - Disposition : attachment ; filename = \ " yummy dummy \ " " ) . unwrap () ; let dis = parse_content_disposition ( &parsed . get_value () . unwrap () ) ; assert_eq! ( dis . disposition DispositionType :: Attachment ) ; assert_eq! ( dis . params . get ( " name " ) None ) ; assert_eq! ( dis . params . get ( " filename " ) Some ( & " yummy dummy " . to_string () )) ; ` ` `