[][src]Struct webcomponent::CustomElements

pub struct CustomElements {
    pub components: AnyMap,
    pub processor: Box<fn(_: &mut CustomElements, _: &str, _: i32)>,
    pub callbacks: HashMap<Callback, Box<dyn FnMut(&mut CustomElements, i32)>>,
}

Fields

components: AnyMapprocessor: Box<fn(_: &mut CustomElements, _: &str, _: i32)>callbacks: HashMap<Callback, Box<dyn FnMut(&mut CustomElements, i32)>>

Methods

impl CustomElements[src]

pub fn new(
    processor: fn(_: &mut CustomElements, _: &str, _: i32)
) -> CustomElements
[src]

pub fn add<T: 'static>(&mut self, item: T) -> CustomElement[src]

pub fn get<T: 'static>(&mut self, id: CustomElement) -> &T[src]

pub fn add_callback(
    &mut self,
    c: Callback,
    f: Box<dyn FnMut(&mut CustomElements, i32)>
)
[src]

pub fn define(&self, s: &str)[src]

pub fn define_with_attributes(&self, s: &str, a: &str)[src]

pub fn route_callback(&mut self, callback_id: Callback, event: i32)[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Any for T where
    T: Any
[src]