Struct hyper::header::UserAgent [-] [+] [src]

pub struct UserAgent(pub String);

User-Agent header, defined in RFC7231

The User-Agent header field contains information about the user agent originating the request, which is often used by servers to help identify the scope of reported interoperability problems, to work around or tailor responses to avoid particular user agent limitations, and for analytics regarding browser or operating system use. A user agent SHOULD send a User-Agent field in each request unless specifically configured not to do so.

ABNF

User-Agent = product *( RWS ( product / comment ) )
product         = token ["/" product-version]
product-version = token

Example values

Notes

Trait Implementations

impl Deref for UserAgent

type Target = String

fn deref<'a>(&'a self) -> &'a String

impl DerefMut for UserAgent

fn deref_mut<'a>(&'a mut self) -> &'a mut String

impl Header for UserAgent

fn header_name() -> &'static str

fn parse_header(raw: &[Vec<u8>]) -> Option<Self>

impl HeaderFormat for UserAgent

fn fmt_header(&self, f: &mut Formatter) -> Result

impl Display for UserAgent

fn fmt(&self, f: &mut Formatter) -> Result

Derived Implementations

impl PartialEq for UserAgent

fn eq(&self, __arg_0: &UserAgent) -> bool

fn ne(&self, __arg_0: &UserAgent) -> bool

impl Debug for UserAgent

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl Clone for UserAgent

fn clone(&self) -> UserAgent

fn clone_from(&mut self, source: &Self)