mirror of
https://github.com/actix/actix-web.git
synced 2024-11-23 01:51:11 +00:00
fix doc test
This commit is contained in:
parent
e9f59bc7d6
commit
a11f3c112f
1 changed files with 3 additions and 4 deletions
|
@ -68,17 +68,16 @@ pub enum DispositionParam {
|
||||||
/// # Example
|
/// # Example
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
/// use hyper::header::{Headers, ContentDisposition, DispositionType, DispositionParam, Charset};
|
/// use actix_web::http::header::{ContentDisposition, DispositionType, DispositionParam, Charset};
|
||||||
///
|
///
|
||||||
/// let mut headers = Headers::new();
|
/// let cd = ContentDisposition {
|
||||||
/// headers.set(ContentDisposition {
|
|
||||||
/// disposition: DispositionType::Attachment,
|
/// disposition: DispositionType::Attachment,
|
||||||
/// parameters: vec![DispositionParam::Filename(
|
/// parameters: vec![DispositionParam::Filename(
|
||||||
/// Charset::Iso_8859_1, // The character set for the bytes of the filename
|
/// Charset::Iso_8859_1, // The character set for the bytes of the filename
|
||||||
/// None, // The optional language tag (see `language-tag` crate)
|
/// None, // The optional language tag (see `language-tag` crate)
|
||||||
/// b"\xa9 Copyright 1989.txt".to_vec() // the actual bytes of the filename
|
/// b"\xa9 Copyright 1989.txt".to_vec() // the actual bytes of the filename
|
||||||
/// )]
|
/// )]
|
||||||
/// });
|
/// };
|
||||||
/// ```
|
/// ```
|
||||||
#[derive(Clone, Debug, PartialEq)]
|
#[derive(Clone, Debug, PartialEq)]
|
||||||
pub struct ContentDisposition {
|
pub struct ContentDisposition {
|
||||||
|
|
Loading…
Reference in a new issue