Struct deno_runtime::web_worker::WebWorkerInternalHandle
source · pub struct WebWorkerInternalHandle {
pub port: Rc<MessagePort>,
pub cancel: Rc<CancelHandle>,
pub name: String,
pub worker_type: WebWorkerType,
/* private fields */
}
Fields§
§port: Rc<MessagePort>
§cancel: Rc<CancelHandle>
§name: String
§worker_type: WebWorkerType
Implementations§
source§impl WebWorkerInternalHandle
impl WebWorkerInternalHandle
sourcepub fn post_event(&self, event: WorkerControlEvent) -> Result<(), AnyError>
pub fn post_event(&self, event: WorkerControlEvent) -> Result<(), AnyError>
Post WorkerEvent to parent as a worker
sourcepub fn is_terminated(&self) -> bool
pub fn is_terminated(&self) -> bool
Check if this worker is terminated or being terminated
sourcepub fn terminate_if_needed(&mut self) -> bool
pub fn terminate_if_needed(&mut self) -> bool
Check if this worker must terminate (because the termination signal is
set), and terminates it if so. Returns whether the worker is terminated or
being terminated, as with Self::is_terminated()
.
Trait Implementations§
source§impl Clone for WebWorkerInternalHandle
impl Clone for WebWorkerInternalHandle
source§fn clone(&self) -> WebWorkerInternalHandle
fn clone(&self) -> WebWorkerInternalHandle
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 moreAuto Trait Implementations§
impl !RefUnwindSafe for WebWorkerInternalHandle
impl !Send for WebWorkerInternalHandle
impl !Sync for WebWorkerInternalHandle
impl Unpin for WebWorkerInternalHandle
impl !UnwindSafe for WebWorkerInternalHandle
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere T: 'a,
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