pub struct SemanticTree { /* private fields */ }Expand description
The semantic tree of every window.
Implementations§
Source§impl SemanticTree
impl SemanticTree
Source§impl SemanticTree
impl SemanticTree
Sourcepub fn get(&self, id: NodeId) -> Option<&Node>
pub fn get(&self, id: NodeId) -> Option<&Node>
The node with this id, or None for an id from another tree that is out of range.
Sourcepub fn warnings(&self) -> &[TreeWarning]
pub fn warnings(&self) -> &[TreeWarning]
Warnings from building the tree.
Sourcepub fn descendants(&self, id: NodeId) -> impl Iterator<Item = NodeId> + '_
pub fn descendants(&self, id: NodeId) -> impl Iterator<Item = NodeId> + '_
Every node below id in depth-first order, following owns into owned subtrees.
Each node appears once.
Sourcepub fn ancestors(&self, id: NodeId) -> impl Iterator<Item = NodeId> + '_
pub fn ancestors(&self, id: NodeId) -> impl Iterator<Item = NodeId> + '_
The parents of id, nearest first.
Sourcepub fn text_content(&self, id: NodeId) -> &str
pub fn text_content(&self, id: NodeId) -> &str
The node’s own text joined with its non-hidden descendants’ text in tree order.
Sourcepub fn find_path(&self, path: &NodePath) -> Option<NodeId>
pub fn find_path(&self, path: &NodePath) -> Option<NodeId>
The node at a path from this or another snapshot.
Sourcepub fn by_raw(&self, raw: &[u32]) -> Option<NodeId>
pub fn by_raw(&self, raw: &[u32]) -> Option<NodeId>
The node recorded at a raw index path, or the deepest node whose raw path is a prefix of it, which is the node that absorbed or merged that raw call.
Sourcepub fn renumber_widget_ids(&mut self, renumber: impl FnMut(usize) -> usize)
pub fn renumber_widget_ids(&mut self, renumber: impl FnMut(usize) -> usize)
Rewrites the number of every WidgetId::Unique through renumber. iced numbers unique
ids from one process-wide counter, so a trace renumbers them to compare across runs.
Trait Implementations§
Source§impl Clone for SemanticTree
impl Clone for SemanticTree
Source§impl Debug for SemanticTree
impl Debug for SemanticTree
Source§impl Default for SemanticTree
impl Default for SemanticTree
Source§impl<'de> Deserialize<'de> for SemanticTree
impl<'de> Deserialize<'de> for SemanticTree
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for SemanticTree
impl PartialEq for SemanticTree
Source§impl Serialize for SemanticTree
impl Serialize for SemanticTree
impl StructuralPartialEq for SemanticTree
Auto Trait Implementations§
impl Forget for SemanticTree
impl Freeze for SemanticTreewhere
*const u8 is !null: Freeze,
PhantomData<Node>: Freeze,
PhantomData<NodeId>: Freeze,
PhantomData<TreeWarning>: Freeze,
PhantomData<String>: Freeze,
impl Move for SemanticTree
impl RefUnwindSafe for SemanticTreewhere
String: RefUnwindSafe,
impl Send for SemanticTree
impl Sync for SemanticTree
impl Unpin for SemanticTree
impl UnsafeUnpin for SemanticTreewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<Node>: UnsafeUnpin,
PhantomData<NodeId>: UnsafeUnpin,
PhantomData<TreeWarning>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
impl UnwindSafe for SemanticTreewhere
RawVecInner: UnwindSafe,
BTreeMap<StateName, StateSource>: UnwindSafe,
&'static str: UnwindSafe,
String: UnwindSafe,
BTreeMap<String, String>: UnwindSafe,
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