pub enum PatternNode {
MetaVar {
meta_var: MetaVariable,
},
Terminal {
text: String,
is_named: bool,
kind_id: u16,
},
Internal {
kind_id: u16,
children: Vec<PatternNode>,
},
}
Variants§
MetaVar
Fields
§
meta_var: MetaVariable
Terminal
Node without children.
Internal
Non-Terminal Syntax Nodes are called Internal
Implementations§
Source§impl PatternNode
impl PatternNode
pub fn is_trivial(&self) -> bool
pub fn fixed_string(&self) -> Cow<'_, str>
Trait Implementations§
Source§impl Clone for PatternNode
impl Clone for PatternNode
Source§fn clone(&self) -> PatternNode
fn clone(&self) -> PatternNode
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for PatternNode
impl Debug for PatternNode
Auto Trait Implementations§
impl Freeze for PatternNode
impl RefUnwindSafe for PatternNode
impl Send for PatternNode
impl Sync for PatternNode
impl Unpin for PatternNode
impl UnwindSafe for PatternNode
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