Skip to main content

WeakReferenceable

Trait WeakReferenceable 

Source
pub(crate) trait WeakReferenceable:
    Sized
    + IDLInterface
    + DomObject {
    // Provided method
    fn downgrade(&self) -> WeakRef<Self> { ... }
}
Expand description

Trait implemented by weak-referenceable interfaces.

Provided Methods§

Source

fn downgrade(&self) -> WeakRef<Self>

Downgrade a DOM object reference to a weak one.

Panics if the object is parent type not leaf 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.

Implementations on Foreign Types§

Source§

impl<D> WeakReferenceable for GPUDevice<D>
where D: DomTypes,

Implementors§