pub struct AstNodeData {
pub kind: String,
pub children: Vec<AstNodeData>,
pub text_length: usize,
pub is_leaf: bool,
}Expand description
AST node data structure for parser testing.
Represents a node in the abstract kind tree with its kind, children, text length, and leaf status used for testing parser output.
Fields§
§kind: StringThe kind of the AST node as a string.
children: Vec<AstNodeData>The child nodes of this AST node.
text_length: usizeThe length of the text covered by this node.
is_leaf: boolWhether this node is a leaf node.
Trait Implementations§
Source§impl Clone for AstNodeData
impl Clone for AstNodeData
Source§fn clone(&self) -> AstNodeData
fn clone(&self) -> AstNodeData
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 AstNodeData
impl Debug for AstNodeData
Source§impl<'de> Deserialize<'de> for AstNodeData
impl<'de> Deserialize<'de> for AstNodeData
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 AstNodeData
impl PartialEq for AstNodeData
Source§impl Serialize for AstNodeData
impl Serialize for AstNodeData
impl StructuralPartialEq for AstNodeData
Auto Trait Implementations§
impl Freeze for AstNodeData
impl RefUnwindSafe for AstNodeData
impl Send for AstNodeData
impl Sync for AstNodeData
impl Unpin for AstNodeData
impl UnsafeUnpin for AstNodeData
impl UnwindSafe for AstNodeData
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