#[non_exhaustive]pub struct Origin {
pub origin: String,
pub local_storage: Vec<LocalStorageItem>,
pub indexed_db: Option<Value>,
}Expand description
Origin with local storage items for storage state.
See: https://playwright.dev/docs/api/class-browser#browser-new-context-option-storage-state
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.origin: StringOrigin URL (e.g., https://example.com)
local_storage: Vec<LocalStorageItem>Local storage items for this origin
indexed_db: Option<Value>IndexedDB contents for this origin, as the driver’s opaque payload.
Populated when the state was captured with
StorageStateOptions::indexed_db, and passed back verbatim on
restore. Kept as raw JSON rather than modelled: the shape is an
implementation detail of the driver’s snapshot format, and the only
supported operation is carrying it back unchanged.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Origin
impl<'de> Deserialize<'de> for Origin
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 Origin
impl RefUnwindSafe for Origin
impl Send for Origin
impl Sync for Origin
impl Unpin for Origin
impl UnsafeUnpin for Origin
impl UnwindSafe for Origin
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