Skip to main content

Render

Trait Render 

Source
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.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§