Struct i_slint_core::item_tree::VisitChildrenResult
source · #[repr(transparent)]pub struct VisitChildrenResult(_);Expand description
The return value of the Component::visit_children_item function
Represents something like enum { Continue, Aborted{aborted_at_item: isize} }.
But this is just wrapping a int because it is easier to use ffi with isize than
complex enum.
-1 means the visitor will continue otherwise this is the index of the item that aborted the visit.
Implementations§
source§impl VisitChildrenResult
impl VisitChildrenResult
sourcepub fn abort(item_index: usize, index_within_repeater: usize) -> Self
pub fn abort(item_index: usize, index_within_repeater: usize) -> Self
Returns a result that means that the visitor must stop, and convey the item that caused the abort
sourcepub fn has_aborted(&self) -> bool
pub fn has_aborted(&self) -> bool
True if the visitor wants to abort the visit
pub fn aborted_index(&self) -> Option<usize>
pub fn aborted_indexes(&self) -> Option<(usize, usize)>
Trait Implementations§
source§impl Clone for VisitChildrenResult
impl Clone for VisitChildrenResult
source§fn clone(&self) -> VisitChildrenResult
fn clone(&self) -> VisitChildrenResult
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for VisitChildrenResult
impl Debug for VisitChildrenResult
source§impl PartialEq<VisitChildrenResult> for VisitChildrenResult
impl PartialEq<VisitChildrenResult> for VisitChildrenResult
source§fn eq(&self, other: &VisitChildrenResult) -> bool
fn eq(&self, other: &VisitChildrenResult) -> bool
This method tests for
self and other values to be equal, and is used
by ==.