pub struct Cookie<'a>(/* private fields */);
Expand description
Representation of an HTTP cookie.
Conforms to IETF RFC6265
§Constructing a Cookie
To construct a cookie it must be parsed and bound to a uri:
use ureq::Cookie;
use ureq::http::Uri;
let uri = Uri::from_static("https://my.server.com");
let cookie = Cookie::parse("name=value", &uri)?;
assert_eq!(cookie.to_string(), "name=value");
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Cookie<'a>
impl<'a> RefUnwindSafe for Cookie<'a>
impl<'a> Send for Cookie<'a>
impl<'a> Sync for Cookie<'a>
impl<'a> Unpin for Cookie<'a>
impl<'a> UnwindSafe for Cookie<'a>
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