pub struct PageSession {
pub url: String,
pub cookies: Vec<Cookie>,
pub local_storage: HashMap<String, String>,
pub session_storage: HashMap<String, String>,
pub timestamp: u64,
}Expand description
Complete page session state including cookies and storage
Fields§
§url: StringCurrent page URL
All cookies
local_storage: HashMap<String, String>localStorage items
session_storage: HashMap<String, String>sessionStorage items
timestamp: u64Timestamp when session was captured
Implementations§
Source§impl PageSession
impl PageSession
Sourcepub fn save_to_file(&self, path: &Path) -> Result<()>
pub fn save_to_file(&self, path: &Path) -> Result<()>
Save session to file
Sourcepub fn load_from_file(path: &Path) -> Result<Self>
pub fn load_from_file(path: &Path) -> Result<Self>
Load session from file
Trait Implementations§
Source§impl Clone for PageSession
impl Clone for PageSession
Source§fn clone(&self) -> PageSession
fn clone(&self) -> PageSession
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PageSession
impl Debug for PageSession
Source§impl<'de> Deserialize<'de> for PageSession
impl<'de> Deserialize<'de> for PageSession
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PageSession
impl RefUnwindSafe for PageSession
impl Send for PageSession
impl Sync for PageSession
impl Unpin for PageSession
impl UnwindSafe for PageSession
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