pub struct SharedWorkerScopeConfig {
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 SharedWorker’s SharedWorkerGlobalScope with stealth-consistent properties from the first connecting page.
DF-WK-9: SharedWorkerGlobalScope inherits the parent page’s StealthProfile. Unlike DedicatedWorker (one parent page), SharedWorker may be connected from multiple pages. The profile is set on first connection and remains fixed for the worker’s lifetime (per DEC-WK-007).
@trace REQ-BRW-004 [entity:SharedWorkerGlobalScope] [criterion:12..17] DF-WK-9
Fields§
§stealth_profile: Option<StealthProfile>The StealthProfile to apply in the SharedWorker’s global scope. Set from the first connecting page’s profile and fixed for lifetime. @trace REQ-BRW-004 [criterion:12] CRIT-STL-WK navigator 一致
user_agent: StringNavigator userAgent — must match the first connecting page’s value. @trace REQ-BRW-004 [entity:WorkerNavigator] [criterion:12]
platform: StringNavigator platform — must match the first connecting page’s value. @trace REQ-BRW-004 [entity:WorkerNavigator] [criterion:12]
hardware_concurrency: usizeNavigator hardwareConcurrency — must match the first connecting page’s value. @trace REQ-BRW-004 [entity:WorkerNavigator] [criterion:12]
language: StringNavigator language — must match the first connecting page’s value. @trace REQ-BRW-004 [entity:WorkerNavigator] [criterion:12]
languages: Vec<String>Navigator languages — must match the first connecting page’s value. @trace REQ-BRW-004 [entity:WorkerNavigator] [criterion:12]
Trait Implementations§
Source§fn clone(&self) -> SharedWorkerScopeConfig
fn clone(&self) -> SharedWorkerScopeConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§fn from(profile: &StealthProfile) -> Self
fn from(profile: &StealthProfile) -> Self
Convert a StealthProfile into a SharedWorkerScopeConfig for Shared Worker inheritance.
DF-WK-9: SharedWorkerGlobalScope inherits the first connecting page’s profile. @trace REQ-BRW-004 [entity:SharedWorkerGlobalScope] [criterion:12] CRIT-STL-WK navigator 一致
Auto 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