pub struct VoidSyntax<T: Token> { /* private fields */ }Expand description
A Node without a syntax parser.
You are encouraged to use this object with
the Document or
the MutableUnit when you need an incremental
lexical parser, but you don’t need a syntax parser:
Document::<VoidSyntax<MyToken>>::new_mutable("foo bar baz").
This object makes the syntax parsing stage of the incremental reprarser a noop.
Trait Implementations§
Source§impl<T: Token> AbstractNode for VoidSyntax<T>
impl<T: Token> AbstractNode for VoidSyntax<T>
Source§fn describe(&self, _verbose: bool) -> Option<&'static str>
fn describe(&self, _verbose: bool) -> Option<&'static str>
An end-user display description of this node. Read more
Source§fn parent_ref(&self) -> NodeRef
fn parent_ref(&self) -> NodeRef
Source§fn set_parent_ref(&mut self, _parent_ref: NodeRef)
fn set_parent_ref(&mut self, _parent_ref: NodeRef)
Updates the parent node reference of this node. Read more
Source§fn capture(&self, _key: Key<'_>) -> Option<Capture<'_>>
fn capture(&self, _key: Key<'_>) -> Option<Capture<'_>>
Returns a set of children of this node associated with the specified
key. Read moreSource§fn rule_name(_rule: NodeRule) -> Option<&'static str>where
Self: Sized,
fn rule_name(_rule: NodeRule) -> Option<&'static str>where
Self: Sized,
A debug name of the parse rule. Read more
Source§fn rule_description(_rule: NodeRule, _verbose: bool) -> Option<&'static str>where
Self: Sized,
fn rule_description(_rule: NodeRule, _verbose: bool) -> Option<&'static str>where
Self: Sized,
An end-user display description of the parse rule. Read more
Source§fn first_capture(&self) -> Option<Capture<'_>>
fn first_capture(&self) -> Option<Capture<'_>>
Returns the first set of children of this node. Read more
Source§fn last_capture(&self) -> Option<Capture<'_>>
fn last_capture(&self) -> Option<Capture<'_>>
Returns the last set of children of this node. Read more
Source§fn captures_len(&self) -> usize
fn captures_len(&self) -> usize
Returns a total number of captures of this node instance.
Source§fn captures_iter(&self) -> CapturesIter<'_, Self> ⓘwhere
Self: Sized,
fn captures_iter(&self) -> CapturesIter<'_, Self> ⓘwhere
Self: Sized,
Returns an iterator over all capture values.
Source§fn children_iter(&self) -> ChildrenIter<'_, Self> ⓘwhere
Self: Sized,
fn children_iter(&self) -> ChildrenIter<'_, Self> ⓘwhere
Self: Sized,
Returns an iterator over all children of this node. Read more
Source§impl<T: Clone + Token> Clone for VoidSyntax<T>
impl<T: Clone + Token> Clone for VoidSyntax<T>
Source§fn clone(&self) -> VoidSyntax<T>
fn clone(&self) -> VoidSyntax<T>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Token> Debug for VoidSyntax<T>
impl<T: Token> Debug for VoidSyntax<T>
Source§impl<T: Token> Default for VoidSyntax<T>
impl<T: Token> Default for VoidSyntax<T>
impl<T: Eq + Token> Eq for VoidSyntax<T>
Source§impl<T: Token> Node for VoidSyntax<T>
impl<T: Token> Node for VoidSyntax<T>
impl<T: PartialEq + Token> StructuralPartialEq for VoidSyntax<T>
Auto Trait Implementations§
impl<T> Freeze for VoidSyntax<T>where
PhantomData<T>: Freeze,
impl<T> RefUnwindSafe for VoidSyntax<T>where
PhantomData<T>: RefUnwindSafe,
impl<T> Send for VoidSyntax<T>where
PhantomData<T>: Send,
impl<T> Sync for VoidSyntax<T>where
PhantomData<T>: Sync,
impl<T> Unpin for VoidSyntax<T>where
PhantomData<T>: Unpin,
impl<T> UnsafeUnpin for VoidSyntax<T>where
PhantomData<T>: UnsafeUnpin,
impl<T> UnwindSafe for VoidSyntax<T>where
PhantomData<T>: 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