pub trait CustomElementMetadata {
const CUSTOM_ELEMENT_NAME: &'static str;
const STATICS: &'static [&'static str] = _;
const TYPE_NAME: &'static str = _;
// Provided method
fn struct_name() -> &'static str { ... }
}Expand description
A trait which allows the define_web_component method to create a
Custom Element (which must by definition inherit from HTMLElement) from
a [wasm_bindgen] annotated Rust struct (for which this trait is
implemented).
Required Associated Constants§
Sourceconst CUSTOM_ELEMENT_NAME: &'static str
const CUSTOM_ELEMENT_NAME: &'static str
The name of the element to register.
Provided Associated Constants§
Provided Methods§
Sourcefn struct_name() -> &'static str
fn struct_name() -> &'static str
[optional] A custom implementation of struct name to class name.
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.