pub struct WorkerScopeConfig {
pub stealth_profile: Option<StealthProfile>,
pub user_agent: String,
pub platform: String,
pub hardware_concurrency: usize,
pub language: String,
pub languages: Vec<String>,
}Expand description
Configuration for initializing a Worker’s DedicatedWorkerGlobalScope with stealth-consistent properties from the parent page.
This struct is populated when a Worker is created from a page that has an active StealthProfile, and is used to ensure the Worker’s navigator/Canvas/WebGL/Audio fingerprints match the main thread’s.
@trace REQ-BRW-004 [entity:DedicatedWorkerGlobalScope] [criterion:12..17]
Fields§
§stealth_profile: Option<StealthProfile>The StealthProfile to apply in the Worker’s global scope. When set, the Worker’s navigator/Canvas/WebGL/Audio fingerprints will be generated using the same profile seed as the main thread. @trace REQ-BRW-004 [criterion:12] CRIT-STL-WK navigator 一致
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]
Trait Implementations§
Source§impl Clone for WorkerScopeConfig
impl Clone for WorkerScopeConfig
Source§fn clone(&self) -> WorkerScopeConfig
fn clone(&self) -> WorkerScopeConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WorkerScopeConfig
impl Debug for WorkerScopeConfig
Source§impl Default for WorkerScopeConfig
impl Default for WorkerScopeConfig
Source§impl From<&StealthProfile> for WorkerScopeConfig
impl From<&StealthProfile> for WorkerScopeConfig
Source§fn from(profile: &StealthProfile) -> Self
fn from(profile: &StealthProfile) -> Self
Convert a StealthProfile into a WorkerScopeConfig for Dedicated Worker inheritance.
Ensures the Worker thread sees identical navigator/Canvas/WebGL/Audio fingerprint values as the parent page. @trace REQ-BRW-004 [criterion:12] CRIT-STL-WK navigator 一致
Auto Trait Implementations§
impl !Freeze for WorkerScopeConfig
impl RefUnwindSafe for WorkerScopeConfig
impl Send for WorkerScopeConfig
impl Sync for WorkerScopeConfig
impl Unpin for WorkerScopeConfig
impl UnsafeUnpin for WorkerScopeConfig
impl UnwindSafe for WorkerScopeConfig
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