HtmlComponent

Trait HtmlComponent 

Source
pub trait HtmlComponent:
    Update
    + Render<Html>
    + Constructor
    + 'static {
    // Provided methods
    fn node_constructor(
        index_id: Option<String>,
        sub_handler: Option<SubHandler<Self>>,
        state: Pin<Box<Self>>,
        children: Self::Children,
    ) -> Box<dyn HtmlNode> { ... }
    fn new<Target: Component + 'static>(
        target: &Target,
        index_id: Option<String>,
        props: Self::Props,
        sub_handler: Option<Box<dyn FnMut(Self::Event) -> Target::Msg>>,
        children: Self::Children,
    ) -> Html { ... }
    fn empty<Target: Component + 'static>(
        target: &Target,
        index_id: Option<String>,
        props: Self::Props,
        sub_handler: Option<Box<dyn FnMut(Self::Event) -> Target::Msg>>,
    ) -> Html { ... }
}

Provided Methods§

Source

fn node_constructor( index_id: Option<String>, sub_handler: Option<SubHandler<Self>>, state: Pin<Box<Self>>, children: Self::Children, ) -> Box<dyn HtmlNode>

Source

fn new<Target: Component + 'static>( target: &Target, index_id: Option<String>, props: Self::Props, sub_handler: Option<Box<dyn FnMut(Self::Event) -> Target::Msg>>, children: Self::Children, ) -> Html

Source

fn empty<Target: Component + 'static>( target: &Target, index_id: Option<String>, props: Self::Props, sub_handler: Option<Box<dyn FnMut(Self::Event) -> Target::Msg>>, ) -> Html

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§