pub struct StorageState {
pub cookies: Vec<Cookie>,
pub local_storage: HashMap<String, HashMap<String, String>>,
pub session_storage: HashMap<String, HashMap<String, String>>,
}Expand description
Storage state for a context
Fields§
Cookies
local_storage: HashMap<String, HashMap<String, String>>Local storage data
session_storage: HashMap<String, HashMap<String, String>>Session storage data
Implementations§
Source§impl StorageState
impl StorageState
Add a cookie
Sourcepub fn with_local_storage(self, origin: &str, key: &str, value: &str) -> Self
pub fn with_local_storage(self, origin: &str, key: &str, value: &str) -> Self
Add local storage item
Sourcepub fn with_session_storage(self, origin: &str, key: &str, value: &str) -> Self
pub fn with_session_storage(self, origin: &str, key: &str, value: &str) -> Self
Add session storage item
Trait Implementations§
Source§impl Clone for StorageState
impl Clone for StorageState
Source§fn clone(&self) -> StorageState
fn clone(&self) -> StorageState
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 StorageState
impl Debug for StorageState
Source§impl Default for StorageState
impl Default for StorageState
Source§fn default() -> StorageState
fn default() -> StorageState
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for StorageState
impl<'de> Deserialize<'de> for StorageState
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 StorageState
impl RefUnwindSafe for StorageState
impl Send for StorageState
impl Sync for StorageState
impl Unpin for StorageState
impl UnsafeUnpin for StorageState
impl UnwindSafe for StorageState
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