enum TreeChange {
New,
Moved,
PendingMove,
Removed,
}Expand description
Tracks changes to a node’s relation to the tree within an update.
This is used to remove nodes from the accessibility tree’s cache when they are no longer in the tree.
Variants§
New
The node was newly created in this update.
Moved
The node has been re-parented in this update.
PendingMove
The node has been added to its new parent, but not yet removed from its old parent.
When a node is moved within the tree, it must be both removed from its old parent and added to its new parent within the same update. This may happen in either order, depending on the relative positions of the node before and after it moves.
- If a node’s new parent is updated before its old parent, the node will be in a
TreeChange::PendingMovestate until its old parent is updated. We expect that it must later be removed from its old parent, at which point its state will be updated toTreeChange::Moved. - If a node’s old parent is updated before its new parent, the node will be first
TreeChange::Removedand thenTreeChange::Moved.
At the end of the update, we assert that there are no pending moves remaining.
Removed
The node is no longer a child of its previous parent.
Trait Implementations§
Source§impl Clone for TreeChange
impl Clone for TreeChange
Source§fn clone(&self) -> TreeChange
fn clone(&self) -> TreeChange
Returns a duplicate 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 TreeChange
impl Debug for TreeChange
Source§impl PartialEq for TreeChange
impl PartialEq for TreeChange
impl Copy for TreeChange
impl StructuralPartialEq for TreeChange
Auto Trait Implementations§
impl Freeze for TreeChange
impl RefUnwindSafe for TreeChange
impl Send for TreeChange
impl Sync for TreeChange
impl Unpin for TreeChange
impl UnsafeUnpin for TreeChange
impl UnwindSafe for TreeChange
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Filterable for T
impl<T> Filterable for T
Source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(DataRequest<'_>) -> bool>
Creates a filterable data provider with the given name for debugging. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
Source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
Source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
Source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert