pub struct UserAgent(/* private fields */);
Expand description
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
CERN-LineMode/2.15 libwww/2.17b3
Bunnies
§Notes
- The parser does not split the value
§Example
use headers::UserAgent;
let ua = UserAgent::from_static("hyper/0.12.2");
Implementations§
Trait Implementations§
source§impl Header for UserAgent
impl Header for UserAgent
source§impl Ord for UserAgent
impl Ord for UserAgent
source§impl PartialOrd for UserAgent
impl PartialOrd for UserAgent
impl Eq for UserAgent
impl StructuralPartialEq for UserAgent
Auto Trait Implementations§
impl !Freeze for UserAgent
impl RefUnwindSafe for UserAgent
impl Send for UserAgent
impl Sync for UserAgent
impl Unpin for UserAgent
impl UnwindSafe for UserAgent
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)