Skip to main content

JsName

Trait JsName 

Source
pub trait JsName {
    const NAME: &'static str;
}
Expand description

The DOM class name of a Javascript type, for the generated Typescript declarations.

Implemented for the js_sys types listed below and for the web_sys transferable objects. A Javascript type outside that list needs a local newtype implementing this trait, since the orphan rule prevents implementing it downstream for a foreign type.

Required Associated Constants§

Source

const NAME: &'static str

The name this type has in Typescript.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl JsName for Array

Source§

const NAME: &'static str = "unknown[]"

Source§

impl JsName for ArrayBuffer

Source§

const NAME: &'static str = "ArrayBuffer"

Source§

impl JsName for BigInt64Array

Source§

const NAME: &'static str = "BigInt64Array"

Source§

impl JsName for BigUint64Array

Source§

const NAME: &'static str = "BigUint64Array"

Source§

impl JsName for DataView

Source§

const NAME: &'static str = "DataView"

Source§

impl JsName for Date

Source§

const NAME: &'static str = "Date"

Source§

impl JsName for Error

Source§

const NAME: &'static str = "Error"

Source§

impl JsName for Float32Array

Source§

const NAME: &'static str = "Float32Array"

Source§

impl JsName for Float64Array

Source§

const NAME: &'static str = "Float64Array"

Source§

impl JsName for Function

Source§

const NAME: &'static str = "Function"

Source§

impl JsName for ImageBitmap

Source§

const NAME: &'static str = "ImageBitmap"

Source§

impl JsName for Int8Array

Source§

const NAME: &'static str = "Int8Array"

Source§

impl JsName for Int16Array

Source§

const NAME: &'static str = "Int16Array"

Source§

impl JsName for Int32Array

Source§

const NAME: &'static str = "Int32Array"

Source§

impl JsName for JsString

Source§

const NAME: &'static str = "string"

Source§

impl JsName for JsValue

Source§

const NAME: &'static str = "unknown"

Source§

impl JsName for Map

Source§

const NAME: &'static str = "Map<unknown, unknown>"

Source§

impl JsName for MessagePort

Source§

const NAME: &'static str = "MessagePort"

Source§

impl JsName for Object

Source§

const NAME: &'static str = "object"

Source§

impl JsName for OffscreenCanvas

Source§

const NAME: &'static str = "OffscreenCanvas"

Source§

impl JsName for Promise

Source§

const NAME: &'static str = "Promise<unknown>"

Source§

impl JsName for ReadableStream

Source§

const NAME: &'static str = "ReadableStream"

Source§

impl JsName for RegExp

Source§

const NAME: &'static str = "RegExp"

Source§

impl JsName for Set

Source§

const NAME: &'static str = "Set<unknown>"

Source§

impl JsName for SharedArrayBuffer

Source§

const NAME: &'static str = "SharedArrayBuffer"

Source§

impl JsName for TransformStream

Source§

const NAME: &'static str = "TransformStream"

Source§

impl JsName for Uint8Array

Source§

const NAME: &'static str = "Uint8Array"

Source§

impl JsName for Uint8ClampedArray

Source§

const NAME: &'static str = "Uint8ClampedArray"

Source§

impl JsName for Uint16Array

Source§

const NAME: &'static str = "Uint16Array"

Source§

impl JsName for Uint32Array

Source§

const NAME: &'static str = "Uint32Array"

Source§

impl JsName for WritableStream

Source§

const NAME: &'static str = "WritableStream"

Implementors§