pub struct SessionCache { /* private fields */ }Expand description
Handle for reading/writing a session cache file.
Implementations§
Source§impl SessionCache
impl SessionCache
Sourcepub fn new(profile_name: &str, controller_url: &str) -> Option<Self>
pub fn new(profile_name: &str, controller_url: &str) -> Option<Self>
Create a new cache handle for the given profile and controller URL.
Returns None if the cache directory can’t be determined.
Sourcepub fn load(&self) -> Option<(String, Option<String>)>
pub fn load(&self) -> Option<(String, Option<String>)>
Load a cached session if it exists and hasn’t expired.
Returns (cookie_header, csrf_token) on success.
Auto Trait Implementations§
impl Freeze for SessionCache
impl RefUnwindSafe for SessionCache
impl Send for SessionCache
impl Sync for SessionCache
impl Unpin for SessionCache
impl UnsafeUnpin for SessionCache
impl UnwindSafe for SessionCache
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