Struct hyper::header::PreferenceApplied [] [src]

pub struct PreferenceApplied(pub Vec<Preference>);

Preference-Applied header, defined in RFC7240

The Preference-Applied response header may be included within a response message as an indication as to which Prefer header tokens were honored by the server and applied to the processing of a request.

ABNF

Preference-Applied = "Preference-Applied" ":" 1#applied-pref
applied-pref = token [ BWS "=" BWS word ]

Example values

Examples

use hyper::header::{Headers, PreferenceApplied, Preference};

let mut headers = Headers::new();
headers.set(
    PreferenceApplied(vec![Preference::RespondAsync])
);
use hyper::header::{Headers, PreferenceApplied, Preference};

let mut headers = Headers::new();
headers.set(
    PreferenceApplied(vec![
        Preference::RespondAsync,
        Preference::ReturnRepresentation,
        Preference::Wait(10u32),
        Preference::Extension("foo".to_owned(),
                              "bar".to_owned(),
                              vec![]),
    ])
);