Enum i_slint_core::item_tree::ItemTreeNode
source · [−]#[repr(u8)]
pub enum ItemTreeNode<T> {
Item {
item: VOffset<T, ItemVTable, AllowPin>,
children_count: u32,
children_index: u32,
parent_index: u32,
},
DynamicTree {
index: usize,
parent_index: u32,
},
}Expand description
The item tree is an array of ItemTreeNode representing a static tree of items within a component.
Variants
Item
Fields
item: VOffset<T, ItemVTable, AllowPin>byte offset where we can find the item (from the *ComponentImpl)
children_count: u32number of children
children_index: u32index of the first children within the item tree
parent_index: u32The index of the parent item (not valid for the root)
Static item
DynamicTree
Fields
index: usizethe index which is passed in the visit_dynamic callback.
parent_index: u32The index of the parent item (not valid for the root)
A placeholder for many instance of item in their own component which are instantiated according to a model.
Implementations
sourceimpl<T> ItemTreeNode<T>
impl<T> ItemTreeNode<T>
pub fn parent_index(&self) -> usize
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for ItemTreeNode<T>
impl<T> Send for ItemTreeNode<T>
impl<T> Sync for ItemTreeNode<T>
impl<T> Unpin for ItemTreeNode<T>
impl<T> UnwindSafe for ItemTreeNode<T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more