pub trait RelmColumn: Any {
type Root: IsA<Widget>;
type Widgets;
type Item: Any;
const COLUMN_NAME: &'static str;
const ENABLE_RESIZE: bool = false;
const ENABLE_EXPAND: bool = false;
// Required method
fn setup(list_item: &ListItem) -> (Self::Root, Self::Widgets);
// Provided methods
fn header_title() -> String { ... }
fn bind(
_item: &mut Self::Item,
_widgets: &mut Self::Widgets,
_root: &mut Self::Root,
) { ... }
fn unbind(
_item: &mut Self::Item,
_widgets: &mut Self::Widgets,
_root: &mut Self::Root,
) { ... }
fn teardown(_list_item: &ListItem) { ... }
fn sort_fn() -> OrdFn<Self::Item> { ... }
}Expand description
An item of a TypedColumnView.
Required Associated Constants§
Sourceconst COLUMN_NAME: &'static str
const COLUMN_NAME: &'static str
The columns created for this list item.
Provided Associated Constants§
Sourceconst ENABLE_RESIZE: bool = false
const ENABLE_RESIZE: bool = false
Whether to enable resizing for this column
Sourceconst ENABLE_EXPAND: bool = false
const ENABLE_EXPAND: bool = false
Whether to enable automatic expanding for this column
Required Associated Types§
Required Methods§
Provided Methods§
Sourcefn header_title() -> String
fn header_title() -> String
Returns the shown title for the column. By default shows RelmColumn::COLUMN_NAME. Useful for translations
Sourcefn bind(
_item: &mut Self::Item,
_widgets: &mut Self::Widgets,
_root: &mut Self::Root,
)
fn bind( _item: &mut Self::Item, _widgets: &mut Self::Widgets, _root: &mut Self::Root, )
Bind the widgets to match the data of the list item.
Sourcefn unbind(
_item: &mut Self::Item,
_widgets: &mut Self::Widgets,
_root: &mut Self::Root,
)
fn unbind( _item: &mut Self::Item, _widgets: &mut Self::Widgets, _root: &mut Self::Root, )
Undo the steps of RelmColumn::bind() if necessary.
Sourcefn teardown(_list_item: &ListItem)
fn teardown(_list_item: &ListItem)
Undo the steps of RelmColumn::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.