mirror of
https://github.com/fafhrd91/actix-web
synced 2024-11-24 00:21:08 +01:00
content_disposition: add doc example
This commit is contained in:
parent
3751656722
commit
1fdf6d13be
@ -70,7 +70,7 @@ pub enum DispositionParam {
|
||||
/// ```
|
||||
/// use actix_web::http::header::{ContentDisposition, DispositionType, DispositionParam, Charset};
|
||||
///
|
||||
/// let cd = ContentDisposition {
|
||||
/// let cd1 = ContentDisposition {
|
||||
/// disposition: DispositionType::Attachment,
|
||||
/// parameters: vec![DispositionParam::Filename(
|
||||
/// Charset::Iso_8859_1, // The character set for the bytes of the filename
|
||||
@ -78,6 +78,15 @@ pub enum DispositionParam {
|
||||
/// b"\xa9 Copyright 1989.txt".to_vec() // the actual bytes of the filename
|
||||
/// )]
|
||||
/// };
|
||||
///
|
||||
/// let cd2 = ContentDisposition {
|
||||
/// disposition: DispositionType::Inline,
|
||||
/// parameters: vec![DispositionParam::Filename(
|
||||
/// Charset::Ext("UTF-8".to_owned()),
|
||||
/// None,
|
||||
/// "\u{2764}".as_bytes().to_vec()
|
||||
/// )]
|
||||
/// };
|
||||
/// ```
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
pub struct ContentDisposition {
|
||||
|
Loading…
Reference in New Issue
Block a user