pub struct Node {
pub error: bool,
/* private fields */
}
Expand description
A node in the token tree.
A node is tagged with a Kind
, and includes any number of child nodes or tokens.
Fields§
§error: bool
true if an error was encountered in this node.
This is not recursive; it is only true for the direct parent of an error span.
Implementations§
Source§impl Node
impl Node
Sourcepub fn iter_tokens(&self) -> impl Iterator<Item = &Token>
pub fn iter_tokens(&self) -> impl Iterator<Item = &Token>
Iterate over tokens, descending into child nodes.
Sourcepub fn iter_children(&self) -> ChildIter<'_>
pub fn iter_children(&self) -> ChildIter<'_>
Iterate over this node’s direct children, without descending.
Trait Implementations§
Source§impl From<Node> for NodeOrToken
impl From<Node> for NodeOrToken
Source§fn from(src: Node) -> NodeOrToken
fn from(src: Node) -> NodeOrToken
Converts to this type from the input type.
Source§impl Ord for Node
impl Ord for Node
Source§impl PartialOrd for Node
impl PartialOrd for Node
impl Eq for Node
impl StructuralPartialEq for Node
Auto Trait Implementations§
impl Freeze for Node
impl RefUnwindSafe for Node
impl Send for Node
impl Sync for Node
impl Unpin for Node
impl UnwindSafe for Node
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T
, using the provided data to resolve any offsets.