Skip to main content

Children

Trait Children 

Source
pub trait Children<R: Renderer> {
    // Required methods
    fn mount_component(
        &self,
        at: &R::Node,
        name: &str,
        props: Map<String, Value>,
    );
    fn mount_slot(
        &self,
        at: &R::Node,
        layout: &str,
        slot: &str,
        props: Map<String, Value>,
    );
    fn unmount(&self, at: &R::Node);

    // Provided methods
    fn binds(&self, _name: &str) -> bool { ... }
    fn mount_bound(
        &self,
        at: &R::Node,
        _layout: &str,
        name: &str,
        props: Map<String, Value>,
    ) { ... }
}
Expand description

The engine’s side of a mount: fills a component or slot node’s element, and empties it when the node goes.

Required Methods§

Source

fn mount_component(&self, at: &R::Node, name: &str, props: Map<String, Value>)

name’s instance into at (its element), with props.

Source

fn mount_slot( &self, at: &R::Node, layout: &str, slot: &str, props: Map<String, Value>, )

The section slot of layout into at (its div), with props.

Source

fn unmount(&self, at: &R::Node)

What was mounted into at goes (its element is being removed).

Provided Methods§

Source

fn binds(&self, _name: &str) -> bool

FRAME-29: whether a component node naming name is a bound mark — name of another profile than this runtime’s.

Source

fn mount_bound( &self, at: &R::Node, _layout: &str, name: &str, props: Map<String, Value>, )

FRAME-29: the section of layout that at, a bound mark, holds: name with props, no assignment reaching it.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§