Trait sauron::prelude::Container[][src]

pub trait Container<MSG, XMSG> {
    fn update(&mut self, msg: MSG) -> Effects<MSG, XMSG>;
fn view(
        &self
    ) -> Node<&'static str, &'static str, &'static str, AttributeValue<XMSG>>; fn style(&self) -> String { ... } }
Expand description

A Container have children that is set from the parent component

It can update its Mode and returns follow ups and/or effects on the next update loop.

The view in the container is set by the parent component. The container itself can not listen to events on its view

Required methods

update the model of this component and return follow ups and/or effects that will be executed on the next update loop.

The container presents the children passed to it from the parent. The container can decide how to display the children components here, but the children nodes here can not trigger Msg that can update this component

Provided methods

optionally a Container can specify its own css style

Implementors