pub struct VisitChildrenResult(/* private fields */);
Expand description
The return value of the ItemTree::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: u32, index_within_repeater: usize) -> Self
pub fn abort(item_index: u32, 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 for VisitChildrenResult
impl PartialEq for VisitChildrenResult
impl Copy for VisitChildrenResult
impl Eq for VisitChildrenResult
impl StructuralPartialEq for VisitChildrenResult
Auto Trait Implementations§
impl Freeze for VisitChildrenResult
impl RefUnwindSafe for VisitChildrenResult
impl Send for VisitChildrenResult
impl Sync for VisitChildrenResult
impl Unpin for VisitChildrenResult
impl UnwindSafe for VisitChildrenResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more