#[non_exhaustive]pub struct BrowserPreHookCtx<'a> {
pub request: &'a Request,
pub page: &'a PageHandle,
pub session: Option<&'a Session>,
pub proxy: Option<&'a ProxyInfo>,
}Expand description
Context supplied to browser pre-navigation hooks.
Unlike the INTERFACE §18 sketch, request is immutable because execution owns an
Arc<Request>. The proposed log field is omitted because no Log type exists; use
tracing macros instead. This context is non-exhaustive so log can be added later without a
breaking change.
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.request: &'a RequestRequest about to be navigated.
page: &'a PageHandleLive page that will perform the navigation.
session: Option<&'a Session>Session selected for this attempt, when sessions are enabled.
proxy: Option<&'a ProxyInfo>Proxy assigned to the browser containing the page.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for BrowserPreHookCtx<'a>
impl<'a> !UnwindSafe for BrowserPreHookCtx<'a>
impl<'a> Freeze for BrowserPreHookCtx<'a>
impl<'a> Send for BrowserPreHookCtx<'a>
impl<'a> Sync for BrowserPreHookCtx<'a>
impl<'a> Unpin for BrowserPreHookCtx<'a>
impl<'a> UnsafeUnpin for BrowserPreHookCtx<'a>
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