Trait DomObjectWrap

Source
pub trait DomObjectWrap<D: DomTypes>:
    Sized
    + DomObject
    + DomGlobalGeneric<D> {
    const WRAP: unsafe fn(JSContext, &D::GlobalScope, Option<HandleObject<'_>>, Box<Self>, CanGc) -> Root<Dom<Self>>;
}
Expand description

A trait to provide a function pointer to wrap function for DOM objects.

Required Associated Constants§

Source

const WRAP: unsafe fn(JSContext, &D::GlobalScope, Option<HandleObject<'_>>, Box<Self>, CanGc) -> Root<Dom<Self>>

Function pointer to the general wrap function type

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§

Source§

impl<D: DomTypes, T: DomObjectIteratorWrap<D> + JSTraceable + Iterable + DomGlobalGeneric<D>> DomObjectWrap<D> for IterableIterator<D, T>

Source§

const WRAP: unsafe fn(JSContext, &D::GlobalScope, Option<HandleObject<'_>>, Box<Self>, CanGc) -> Root<Dom<Self>> = T::ITER_WRAP