#[repr(C)]pub struct ServiceWorkerGlobalScope {
workerglobalscope: WorkerGlobalScope,
task_queue: TaskQueue<ServiceWorkerScriptMsg>,
own_sender: Sender<ServiceWorkerScriptMsg>,
time_out_port: Receiver<Instant>,
swmanager_sender: IpcSender<ServiceWorkerMsg>,
scope_url: ServoUrl,
control_receiver: Receiver<ServiceWorkerControlMsg>,
}
Fields§
§workerglobalscope: WorkerGlobalScope
§task_queue: TaskQueue<ServiceWorkerScriptMsg>
§own_sender: Sender<ServiceWorkerScriptMsg>
§time_out_port: Receiver<Instant>
A port on which a single “time-out” message can be received, indicating the sw should stop running, while still draining the task-queue
swmanager_sender: IpcSender<ServiceWorkerMsg>
§scope_url: ServoUrl
§control_receiver: Receiver<ServiceWorkerControlMsg>
A receiver of control messages, currently only used to signal shutdown.
Implementations§
source§impl ServiceWorkerGlobalScope
impl ServiceWorkerGlobalScope
fn __assert_parent_type(&self)
source§impl ServiceWorkerGlobalScope
impl ServiceWorkerGlobalScope
fn new_inherited( init: WorkerGlobalScopeInit, worker_url: ServoUrl, from_devtools_receiver: Receiver<DevtoolScriptControlMsg>, runtime: Runtime, own_sender: Sender<ServiceWorkerScriptMsg>, receiver: Receiver<ServiceWorkerScriptMsg>, time_out_port: Receiver<Instant>, swmanager_sender: IpcSender<ServiceWorkerMsg>, scope_url: ServoUrl, control_receiver: Receiver<ServiceWorkerControlMsg>, closing: Arc<AtomicBool> ) -> ServiceWorkerGlobalScope
pub fn new( init: WorkerGlobalScopeInit, worker_url: ServoUrl, from_devtools_receiver: Receiver<DevtoolScriptControlMsg>, runtime: Runtime, own_sender: Sender<ServiceWorkerScriptMsg>, receiver: Receiver<ServiceWorkerScriptMsg>, time_out_port: Receiver<Instant>, swmanager_sender: IpcSender<ServiceWorkerMsg>, scope_url: ServoUrl, control_receiver: Receiver<ServiceWorkerControlMsg>, closing: Arc<AtomicBool> ) -> Root<Dom<ServiceWorkerGlobalScope>>
pub fn run_serviceworker_scope( scope_things: ScopeThings, own_sender: Sender<ServiceWorkerScriptMsg>, receiver: Receiver<ServiceWorkerScriptMsg>, devtools_receiver: IpcReceiver<DevtoolScriptControlMsg>, swmanager_sender: IpcSender<ServiceWorkerMsg>, scope_url: ServoUrl, control_receiver: Receiver<ServiceWorkerControlMsg>, context_sender: Sender<ContextForRequestInterrupt>, closing: Arc<AtomicBool> ) -> JoinHandle<()>
fn handle_mixed_message(&self, msg: MixedMessage) -> bool
fn has_timed_out(&self) -> bool
fn handle_script_event(&self, msg: ServiceWorkerScriptMsg)
pub fn script_chan(&self) -> Box<dyn ScriptChan + Send>
fn dispatch_activate(&self)
Trait Implementations§
source§impl Castable for ServiceWorkerGlobalScope
impl Castable for ServiceWorkerGlobalScope
source§impl DomObject for ServiceWorkerGlobalScope
impl DomObject for ServiceWorkerGlobalScope
source§impl HasParent for ServiceWorkerGlobalScope
impl HasParent for ServiceWorkerGlobalScope
source§fn as_parent(&self) -> &WorkerGlobalScope
fn as_parent(&self) -> &WorkerGlobalScope
This is used in a type assertion to ensure that the source and webidls agree as to what the parent type is
type Parent = WorkerGlobalScope
source§impl MallocSizeOf for ServiceWorkerGlobalScope
impl MallocSizeOf for ServiceWorkerGlobalScope
source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
source§impl MutDomObject for ServiceWorkerGlobalScope
impl MutDomObject for ServiceWorkerGlobalScope
source§unsafe fn init_reflector(&self, obj: *mut JSObject)
unsafe fn init_reflector(&self, obj: *mut JSObject)
Initializes the Reflector
source§impl PartialEq<ServiceWorkerGlobalScope> for ServiceWorkerGlobalScope
impl PartialEq<ServiceWorkerGlobalScope> for ServiceWorkerGlobalScope
source§fn eq(&self, other: &ServiceWorkerGlobalScope) -> bool
fn eq(&self, other: &ServiceWorkerGlobalScope) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl ServiceWorkerGlobalScopeMethods for ServiceWorkerGlobalScope
impl ServiceWorkerGlobalScopeMethods for ServiceWorkerGlobalScope
fn GetOnmessage(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnmessage(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnmessageerror(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnmessageerror(&self, listener: Option<Rc<EventHandlerNonNull>>)
source§impl Traceable for ServiceWorkerGlobalScope
impl Traceable for ServiceWorkerGlobalScope
source§impl WorkerEventLoopMethods for ServiceWorkerGlobalScope
impl WorkerEventLoopMethods for ServiceWorkerGlobalScope
type WorkerMsg = ServiceWorkerScriptMsg
type ControlMsg = ServiceWorkerControlMsg
type Event = MixedMessage
fn task_queue(&self) -> &TaskQueue<ServiceWorkerScriptMsg>
fn handle_event(&self, event: MixedMessage) -> bool
fn handle_worker_post_event( &self, _worker: &Trusted<Worker> ) -> Option<AutoWorkerReset<'_>>
fn from_control_msg(&self, msg: ServiceWorkerControlMsg) -> MixedMessage
fn from_worker_msg(&self, msg: ServiceWorkerScriptMsg) -> MixedMessage
fn from_devtools_msg(&self, msg: DevtoolScriptControlMsg) -> MixedMessage
fn control_receiver(&self) -> &Receiver<ServiceWorkerControlMsg>
impl DerivedFrom<EventTarget> for ServiceWorkerGlobalScope
impl DerivedFrom<GlobalScope> for ServiceWorkerGlobalScope
impl DerivedFrom<WorkerGlobalScope> for ServiceWorkerGlobalScope
Auto Trait Implementations§
impl !RefUnwindSafe for ServiceWorkerGlobalScope
impl !Send for ServiceWorkerGlobalScope
impl !Sync for ServiceWorkerGlobalScope
impl Unpin for ServiceWorkerGlobalScope
impl !UnwindSafe for ServiceWorkerGlobalScope
Blanket Implementations§
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> MaybeBoxed<Box<T, Global>> for T
impl<T> MaybeBoxed<Box<T, Global>> for T
source§fn maybe_boxed(self) -> Box<T, Global>
fn maybe_boxed(self) -> Box<T, Global>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert