pub struct BrowserContext {
pub id: Option<BrowserContextId>,
}
Expand description
BrowserContexts provide a way to operate multiple independent browser sessions. When a browser is launched, it has a single BrowserContext used by default.
If a page opens another page, e.g. with a window.open
call, the popup will
belong to the parent page’s browser context.
Fields§
§id: Option<BrowserContextId>
Implementations§
Source§impl BrowserContext
impl BrowserContext
Sourcepub fn is_incognito(&self) -> bool
pub fn is_incognito(&self) -> bool
Whether the BrowserContext is incognito.
Sourcepub fn id(&self) -> Option<&BrowserContextId>
pub fn id(&self) -> Option<&BrowserContextId>
The identifier of this context
Trait Implementations§
Source§impl Clone for BrowserContext
impl Clone for BrowserContext
Source§fn clone(&self) -> BrowserContext
fn clone(&self) -> BrowserContext
Returns a copy 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 BrowserContext
impl Debug for BrowserContext
Source§impl Default for BrowserContext
impl Default for BrowserContext
Source§fn default() -> BrowserContext
fn default() -> BrowserContext
Returns the “default value” for a type. Read more
Source§impl From<BrowserContextId> for BrowserContext
impl From<BrowserContextId> for BrowserContext
Source§fn from(id: BrowserContextId) -> Self
fn from(id: BrowserContextId) -> Self
Converts to this type from the input type.
Source§impl Hash for BrowserContext
impl Hash for BrowserContext
Source§impl PartialEq for BrowserContext
impl PartialEq for BrowserContext
impl Eq for BrowserContext
impl StructuralPartialEq for BrowserContext
Auto Trait Implementations§
impl Freeze for BrowserContext
impl RefUnwindSafe for BrowserContext
impl Send for BrowserContext
impl Sync for BrowserContext
impl Unpin for BrowserContext
impl UnwindSafe for BrowserContext
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more