Skip to main content

IDLInterface

Trait IDLInterface 

Source
pub trait IDLInterface {
    const PROTO_FIRST: u16 = 0;
    const PROTO_LAST: u16 = u16::MAX;

    // Required method
    fn derives(_: &'static DOMClass) -> bool;
}
Expand description

A trait to check whether a given JSObject implements an IDL interface.

Provided Associated Constants§

Source

const PROTO_FIRST: u16 = 0

First prototype ID in the DFS-ordered range for this interface and its descendants.

Source

const PROTO_LAST: u16 = u16::MAX

Last prototype ID in the DFS-ordered range for this interface and its descendants.

Required Methods§

Source

fn derives(_: &'static DOMClass) -> bool

Returns whether the given DOM class derives that interface.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§