RelmGridItem

Trait RelmGridItem 

Source
pub trait RelmGridItem: Any {
    type Root: IsA<Widget>;
    type Widgets;

    // Required method
    fn setup(grid_item: &ListItem) -> (Self::Root, Self::Widgets);

    // Provided methods
    fn bind(&mut self, _widgets: &mut Self::Widgets, _root: &mut Self::Root) { ... }
    fn unbind(&mut self, _widgets: &mut Self::Widgets, _root: &mut Self::Root) { ... }
    fn teardown(_grid_item: &ListItem) { ... }
}
Expand description

An item of a TypedGridView.

Required Associated Types§

Source

type Root: IsA<Widget>

The top-level widget for the grid item.

Source

type Widgets

The widgets created for the grid item.

Required Methods§

Source

fn setup(grid_item: &ListItem) -> (Self::Root, Self::Widgets)

Construct the widgets.

Provided Methods§

Source

fn bind(&mut self, _widgets: &mut Self::Widgets, _root: &mut Self::Root)

Bind the widgets to match the data of the grid item.

Source

fn unbind(&mut self, _widgets: &mut Self::Widgets, _root: &mut Self::Root)

Undo the steps of RelmGridItem::bind() if necessary.

Source

fn teardown(_grid_item: &ListItem)

Undo the steps of RelmGridItem::setup() if necessary.

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§