pub struct WorkerNavigator {
pub user_agent: String,
pub platform: String,
pub hardware_concurrency: usize,
pub language: String,
pub languages: Vec<String>,
pub connection: Option<WorkerNetworkInformation>,
pub cookie_enabled: bool,
pub max_touch_points: u32,
pub product: String,
pub app_code_name: String,
pub app_name: String,
pub app_version: String,
}Expand description
Represents the Worker’s navigator object (self.navigator).
All fingerprint-relevant fields must match the parent page’s values per SPEC criterion #12: “CRIT-STL-WK navigator 一致: worker 内 navigator.userAgent/platform/hardwareConcurrency/language(s) === 主线程对应值”.
@trace REQ-BRW-004 [entity:WorkerNavigator] [criterion:12]
Fields§
§user_agent: Stringnavigator.userAgent — must match main thread’s value. @trace REQ-BRW-004 [entity:WorkerNavigator] [criterion:12]
platform: Stringnavigator.platform — must match main thread’s value. @trace REQ-BRW-004 [entity:WorkerNavigator] [criterion:12]
hardware_concurrency: usizenavigator.hardwareConcurrency — must match main thread’s value. @trace REQ-BRW-004 [entity:WorkerNavigator] [criterion:12]
language: Stringnavigator.language — must match main thread’s value. @trace REQ-BRW-004 [entity:WorkerNavigator] [criterion:12]
languages: Vec<String>navigator.languages — must match main thread’s value. @trace REQ-BRW-004 [entity:WorkerNavigator] [criterion:12]
connection: Option<WorkerNetworkInformation>navigator.connection — NetworkInformation (optional, read-only). @trace REQ-BRW-004 [entity:WorkerNavigator]
navigator.cookieEnabled — mirrors main thread value. @trace REQ-BRW-004 [entity:WorkerNavigator]
max_touch_points: u32navigator.maxTouchPoints — mirrors main thread value. @trace REQ-BRW-004 [entity:WorkerNavigator]
product: Stringnavigator.product — always “Gecko” per spec. @trace REQ-BRW-004 [entity:WorkerNavigator]
app_code_name: Stringnavigator.appCodeName — always “Mozilla” per spec. @trace REQ-BRW-004 [entity:WorkerNavigator]
app_name: Stringnavigator.appName — always “Netscape” per spec. @trace REQ-BRW-004 [entity:WorkerNavigator]
app_version: Stringnavigator.appVersion — mirrors main thread value. @trace REQ-BRW-004 [entity:WorkerNavigator]
Implementations§
Sourcepub fn from_scope_config(config: &WorkerScopeConfig) -> Self
pub fn from_scope_config(config: &WorkerScopeConfig) -> Self
Create a WorkerNavigator from a WorkerScopeConfig.
The navigator values are populated from the config which carries the parent page’s fingerprint values (criterion #12).
@trace REQ-BRW-004 [entity:WorkerNavigator] [criterion:12]
Create a WorkerNavigator from a SharedWorkerScopeConfig.
@trace REQ-BRW-004 [entity:WorkerNavigator] [criterion:12]
Sourcepub fn from_service_scope_config(config: &ServiceWorkerScopeConfig) -> Self
pub fn from_service_scope_config(config: &ServiceWorkerScopeConfig) -> Self
Create a WorkerNavigator from a ServiceWorkerScopeConfig.
@trace REQ-BRW-004 [entity:WorkerNavigator] [criterion:12]
Trait Implementations§
Source§fn clone(&self) -> WorkerNavigator
fn clone(&self) -> WorkerNavigator
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
Blanket Implementations§
Source§impl<T> AsCtxPtr for Twhere
T: ?Sized,
impl<T> AsCtxPtr for Twhere
T: ?Sized,
Source§fn as_ctx_ptr(&self) -> *mut Selfwhere
Self: Sized,
fn as_ctx_ptr(&self) -> *mut Selfwhere
Self: Sized,
self’s address as *mut Self for deferred-task / scopeguard /
ref_guard ctx slots. The closures/trampolines deref it as shared
(&*p) — every method they reach is &self post-R-2, so no write
provenance is required; the *mut spelling is purely to match the
existing DerefOnDrop / HasAutoFlush / RefCount ABI.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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Filterable for T
impl<T> Filterable for T
Source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
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> ⓘ
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> ⓘ
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