pub(crate) trait PromiseRejectionEventMethods<D: DomTypes> {
// Required methods
fn Promise(&self, cx: SafeJSContext) -> NonNull<JSObject>;
fn Reason(&self, cx: SafeJSContext, retval: MutableHandleValue<'_>);
fn IsTrusted(&self) -> bool;
fn Constructor(
global: &D::GlobalScope,
proto: Option<HandleObject<'_>>,
can_gc: CanGc,
type_: DOMString,
eventInitDict: RootedTraceableBox<PromiseRejectionEventInit>,
) -> Fallible<DomRoot<D::PromiseRejectionEvent>>;
}
Required Methods§
fn Promise(&self, cx: SafeJSContext) -> NonNull<JSObject>
fn Reason(&self, cx: SafeJSContext, retval: MutableHandleValue<'_>)
fn IsTrusted(&self) -> bool
fn Constructor( global: &D::GlobalScope, proto: Option<HandleObject<'_>>, can_gc: CanGc, type_: DOMString, eventInitDict: RootedTraceableBox<PromiseRejectionEventInit>, ) -> Fallible<DomRoot<D::PromiseRejectionEvent>>
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.