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
sourceimpl 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
sourceimpl Clone for VisitChildrenResult
impl Clone for VisitChildrenResult
sourcefn clone(&self) -> VisitChildrenResult
fn clone(&self) -> VisitChildrenResult
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for VisitChildrenResult
impl Debug for VisitChildrenResult
sourceimpl PartialEq<VisitChildrenResult> for VisitChildrenResult
impl PartialEq<VisitChildrenResult> for VisitChildrenResult
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &VisitChildrenResult) -> bool
fn ne(&self, other: &VisitChildrenResult) -> bool
This method tests for !=
.
impl Copy for VisitChildrenResult
impl Eq for VisitChildrenResult
impl StructuralEq for VisitChildrenResult
impl StructuralPartialEq for VisitChildrenResult
Auto Trait Implementations
impl RefUnwindSafe for VisitChildrenResult
impl Send for VisitChildrenResult
impl Sync for VisitChildrenResult
impl Unpin for VisitChildrenResult
impl UnwindSafe for VisitChildrenResult
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