Trait WorkerMethods

Source
pub(crate) trait WorkerMethods<D>
where D: DomTypes,
{ // Required methods fn Terminate(&self); fn PostMessage( &self, cx: JSContext, message: Handle<'_, Value>, transfer: CustomAutoRooterGuard<'_, Vec<*mut JSObject>>, ) -> Result<(), Error>; fn PostMessage_( &self, cx: JSContext, message: Handle<'_, Value>, options: RootedTraceableBox<StructuredSerializeOptions>, ) -> Result<(), Error>; fn GetOnmessage(&self) -> Option<Rc<EventHandlerNonNull<D>>>; fn SetOnmessage(&self, value: Option<Rc<EventHandlerNonNull<D>>>); fn GetOnmessageerror(&self) -> Option<Rc<EventHandlerNonNull<D>>>; fn SetOnmessageerror(&self, value: Option<Rc<EventHandlerNonNull<D>>>); fn GetOnerror(&self) -> Option<Rc<EventHandlerNonNull<D>>>; fn SetOnerror(&self, value: Option<Rc<EventHandlerNonNull<D>>>); fn Constructor( global: &<D as DomTypes>::GlobalScope, proto: Option<Handle<'_, *mut JSObject>>, can_gc: CanGc, scriptURL: TrustedScriptURLOrUSVString<D>, options: &WorkerOptions, ) -> Result<Root<Dom<<D as DomTypes>::Worker>>, Error>; }

Required Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§