pub trait Render {
    type Base;
    type Data: Default;

    // Required methods
    fn create(
        base: &Self::Base,
        parent: &Node,
        name: impl AsRef<str>
    ) -> Self::Data;
    fn update(base: &Self::Base, data: &mut Self::Data);
}
Expand description

Renders inspect state. This trait should be implemented with a relevant constraint on the base type.

Required Associated Types§

source

type Base

The base type, provided by the user.

source

type Data: Default

Inspect data, provided by implementors of this trait.

Required Methods§

source

fn create(base: &Self::Base, parent: &Node, name: impl AsRef<str>) -> Self::Data

Initializes the inspect data from the current state of base.

source

fn update(base: &Self::Base, data: &mut Self::Data)

Updates the inspect data from the current state of base.

Object Safety§

This trait is not object safe.

Implementors§