pub struct ModifierChainNodeRef<'a> { /* private fields */ }Implementations§
Source§impl<'a> ModifierChainNodeRef<'a>
impl<'a> ModifierChainNodeRef<'a>
Sourcepub fn with_node<R>(&self, f: impl FnOnce(&dyn ModifierNode) -> R) -> Option<R>
pub fn with_node<R>(&self, f: impl FnOnce(&dyn ModifierNode) -> R) -> Option<R>
Provides access to the node via a closure, properly handling RefCell borrows. Returns None for sentinel nodes.
Sourcepub fn parent(&self) -> Option<Self>
pub fn parent(&self) -> Option<Self>
Returns the parent reference, including sentinel head when applicable.
Sourcepub fn child(&self) -> Option<Self>
pub fn child(&self) -> Option<Self>
Returns the child reference, including sentinel tail for the last entry.
Sourcepub fn kind_set(&self) -> NodeCapabilities
pub fn kind_set(&self) -> NodeCapabilities
Returns the capability mask for this specific node.
Sourcepub fn entry_index(&self) -> Option<usize>
pub fn entry_index(&self) -> Option<usize>
Returns the entry index backing this node when it is part of the chain.
Sourcepub fn delegate_depth(&self) -> usize
pub fn delegate_depth(&self) -> usize
Returns how many delegate hops separate this node from its root element.
Sourcepub fn aggregate_child_capabilities(&self) -> NodeCapabilities
pub fn aggregate_child_capabilities(&self) -> NodeCapabilities
Returns the aggregated capability mask for the subtree rooted at this node.
Sourcepub fn is_sentinel(&self) -> bool
pub fn is_sentinel(&self) -> bool
Returns true if this reference targets either sentinel.
Sourcepub fn has_capability(&self, mask: NodeCapabilities) -> bool
pub fn has_capability(&self, mask: NodeCapabilities) -> bool
Returns true if this node has any capability bits present in mask.
Sourcepub fn visit_descendants<F>(self, include_self: bool, f: F)where
F: FnMut(ModifierChainNodeRef<'a>),
pub fn visit_descendants<F>(self, include_self: bool, f: F)where
F: FnMut(ModifierChainNodeRef<'a>),
Visits descendant nodes, optionally including self, in insertion order.
Sourcepub fn visit_descendants_matching<F>(
self,
include_self: bool,
mask: NodeCapabilities,
f: F,
)where
F: FnMut(ModifierChainNodeRef<'a>),
pub fn visit_descendants_matching<F>(
self,
include_self: bool,
mask: NodeCapabilities,
f: F,
)where
F: FnMut(ModifierChainNodeRef<'a>),
Visits descendant nodes that match mask, short-circuiting when possible.
Sourcepub fn visit_ancestors<F>(self, include_self: bool, f: F)where
F: FnMut(ModifierChainNodeRef<'a>),
pub fn visit_ancestors<F>(self, include_self: bool, f: F)where
F: FnMut(ModifierChainNodeRef<'a>),
Visits ancestor nodes up to (but excluding) the sentinel head.
Sourcepub fn visit_ancestors_matching<F>(
self,
include_self: bool,
mask: NodeCapabilities,
f: F,
)where
F: FnMut(ModifierChainNodeRef<'a>),
pub fn visit_ancestors_matching<F>(
self,
include_self: bool,
mask: NodeCapabilities,
f: F,
)where
F: FnMut(ModifierChainNodeRef<'a>),
Visits ancestor nodes that match mask.
Sourcepub fn find_parent_focus_target(&self) -> Option<ModifierChainNodeRef<'a>>
pub fn find_parent_focus_target(&self) -> Option<ModifierChainNodeRef<'a>>
Finds the nearest ancestor focus target node.
This is useful for focus navigation to find the parent focusable component in the tree.
Sourcepub fn find_first_focus_target(&self) -> Option<ModifierChainNodeRef<'a>>
pub fn find_first_focus_target(&self) -> Option<ModifierChainNodeRef<'a>>
Finds the first descendant focus target node.
This is useful for focus navigation to find the first focusable child component in the tree.
Sourcepub fn has_focus_capability_in_ancestors(&self) -> bool
pub fn has_focus_capability_in_ancestors(&self) -> bool
Returns true if this node or any ancestor has focus capability.
Trait Implementations§
Source§impl<'a> Clone for ModifierChainNodeRef<'a>
impl<'a> Clone for ModifierChainNodeRef<'a>
Source§fn clone(&self) -> ModifierChainNodeRef<'a>
fn clone(&self) -> ModifierChainNodeRef<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more