#[non_exhaustive]pub struct PageOptions {
pub session: Option<Arc<Session>>,
pub extra_headers: HeaderMap,
}Expand description
Per-page creation context consumed by browser hooks.
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.session: Option<Arc<Session>>Session whose cookies should be synchronized with the page.
extra_headers: HeaderMapHeaders to install on the page before navigation.
Implementations§
Source§impl PageOptions
impl PageOptions
Sourcepub fn with_session(self, session: Arc<Session>) -> Self
pub fn with_session(self, session: Arc<Session>) -> Self
Sets the session associated with the page.
Sourcepub fn with_extra_headers(self, extra_headers: HeaderMap) -> Self
pub fn with_extra_headers(self, extra_headers: HeaderMap) -> Self
Replaces the page’s extra request headers.
Trait Implementations§
Source§impl Clone for PageOptions
impl Clone for PageOptions
Source§fn clone(&self) -> PageOptions
fn clone(&self) -> PageOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PageOptions
impl Debug for PageOptions
Source§impl Default for PageOptions
impl Default for PageOptions
Source§fn default() -> PageOptions
fn default() -> PageOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for PageOptions
impl !UnwindSafe for PageOptions
impl Freeze for PageOptions
impl Send for PageOptions
impl Sync for PageOptions
impl Unpin for PageOptions
impl UnsafeUnpin for PageOptions
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