i_slint_core::item_tree

Enum ItemTreeNode

Source
#[repr(u8)]
pub enum ItemTreeNode { Item { is_accessible: bool, children_count: u32, children_index: u32, parent_index: u32, item_array_index: u32, }, DynamicTree { index: u32, parent_index: u32, }, }
Expand description

The item tree is an array of ItemTreeNode representing a static tree of items within a ItemTree.

Variants§

§

Item

Static item

Fields

§is_accessible: bool

True when the item has accessibility properties attached

§children_count: u32

number of children

§children_index: u32

index of the first children within the item tree

§parent_index: u32

The index of the parent item (not valid for the root)

§item_array_index: u32

The index in the extra item_array

§

DynamicTree

A placeholder for many instance of item in their own ItemTree which are instantiated according to a model.

Fields

§index: u32

the index which is passed in the visit_dynamic callback.

§parent_index: u32

The index of the parent item (not valid for the root)

Implementations§

Trait Implementations§

Source§

impl Debug for ItemTreeNode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.