Skip to main content

IDLInterface

Trait IDLInterface 

Source
pub trait IDLInterface {
    const PROTO_ID: ID;
    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.

Required Associated Constants§

Source

const PROTO_ID: ID

The concrete type represented by this interface instance.

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", so this trait is not object safe.

Implementors§

Source§

impl<D, T> IDLInterface for IterableIterator<D, T>

Source§

const PROTO_ID: ID = crate::codegen::PrototypeList::ID::Last

§

impl<D: DomTypes> IDLInterface for Crypto<D>

§

const PROTO_ID: ID = PrototypeList::ID::Crypto

§

const PROTO_FIRST: u16 = 60

§

const PROTO_LAST: u16 = 60

§

impl<D: DomTypes> IDLInterface for CryptoKey<D>

§

const PROTO_ID: ID = PrototypeList::ID::CryptoKey

§

const PROTO_FIRST: u16 = 61

§

const PROTO_LAST: u16 = 61

§

impl<D: DomTypes> IDLInterface for SubtleCrypto<D>

§

const PROTO_ID: ID = PrototypeList::ID::SubtleCrypto

§

const PROTO_FIRST: u16 = 508

§

const PROTO_LAST: u16 = 508