pub struct CookieJar { /* private fields */ }Implementations§
Source§impl CookieJar
impl CookieJar
Sourcepub fn from_file(jar_file: &str, _auto_update: bool) -> Result<Self, Error>
pub fn from_file(jar_file: &str, _auto_update: bool) -> Result<Self, Error>
Instantiate a new cookie jar from a Netscape formatted cookies.txt file
Sourcepub fn from_string(contents: &String) -> Self
pub fn from_string(contents: &String) -> Self
Instantiate cookie jar from a string of a Netscape formatted cookies.txt file
Sourcepub fn set_jar_file(&mut self, jar_file: &str)
pub fn set_jar_file(&mut self, jar_file: &str)
Update jar filename
Sourcepub fn set_auto_update(&mut self, auto_update: bool)
pub fn set_auto_update(&mut self, auto_update: bool)
Change auto_update
pub fn set(&mut self, cookie: &Cookie)
Sourcepub fn get_http_header(&self, uri: &Url) -> Option<String>
pub fn get_http_header(&self, uri: &Url) -> Option<String>
Get http header for host
Sourcepub fn update_jar(&mut self, headers: &HttpHeaders)
pub fn update_jar(&mut self, headers: &HttpHeaders)
Update cookie jar from response http headers
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CookieJar
impl RefUnwindSafe for CookieJar
impl Send for CookieJar
impl Sync for CookieJar
impl Unpin for CookieJar
impl UnwindSafe for CookieJar
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