pub trait RepeatedItemTree:
ItemTree
+ HasStaticVTable<ItemTreeVTable>
+ 'static {
type Data: 'static;
// Required method
fn update(&self, index: usize, data: Self::Data);
// Provided methods
fn init(&self) { ... }
fn listview_layout(
self: Pin<&Self>,
_offset_y: &mut LogicalLength,
_viewport_width: Pin<&Property<LogicalLength>>,
) { ... }
fn box_layout_data(
self: Pin<&Self>,
_orientation: Orientation,
) -> BoxLayoutCellData { ... }
}
Expand description
ItemTree that can be instantiated by a repeater.
Required Associated Types§
Required Methods§
Provided Methods§
Sourcefn init(&self)
fn init(&self)
Called once after the ItemTree has been instantiated and update() was called once.
Sourcefn listview_layout(
self: Pin<&Self>,
_offset_y: &mut LogicalLength,
_viewport_width: Pin<&Property<LogicalLength>>,
)
fn listview_layout( self: Pin<&Self>, _offset_y: &mut LogicalLength, _viewport_width: Pin<&Property<LogicalLength>>, )
Layout this item in the listview
offset_y is the y
position where this item should be placed.
it should be updated to be to the y position of the next item.
Sourcefn box_layout_data(
self: Pin<&Self>,
_orientation: Orientation,
) -> BoxLayoutCellData
fn box_layout_data( self: Pin<&Self>, _orientation: Orientation, ) -> BoxLayoutCellData
Returns what’s needed to perform the layout if this ItemTrees is in a box layout
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.