Skip to main content

LeafNode

Trait LeafNode 

Source
pub trait LeafNode<'tree>: FromNode<'tree> {
    // Required method
    fn text(&self) -> &'tree str;
}
Expand description

Implemented by every generated leaf type (identifiers, literals, etc.)

Required Methods§

Source

fn text(&self) -> &'tree str

Raw text of this node in the source, borrowed from src.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<'tree> LeafNode<'tree> for BooleanLiteral<'tree>

Source§

impl<'tree> LeafNode<'tree> for CharLiteral<'tree>

Source§

impl<'tree> LeafNode<'tree> for Crate<'tree>

Source§

impl<'tree> LeafNode<'tree> for DocComment<'tree>

Source§

impl<'tree> LeafNode<'tree> for EmptyStatement<'tree>

Source§

impl<'tree> LeafNode<'tree> for EscapeSequence<'tree>

Source§

impl<'tree> LeafNode<'tree> for FieldIdentifier<'tree>

Source§

impl<'tree> LeafNode<'tree> for FloatLiteral<'tree>

Source§

impl<'tree> LeafNode<'tree> for FragmentSpecifier<'tree>

Source§

impl<'tree> LeafNode<'tree> for Identifier<'tree>

Source§

impl<'tree> LeafNode<'tree> for InnerDocCommentMarker<'tree>

Source§

impl<'tree> LeafNode<'tree> for IntegerLiteral<'tree>

Source§

impl<'tree> LeafNode<'tree> for Metavariable<'tree>

Source§

impl<'tree> LeafNode<'tree> for MutableSpecifier<'tree>

Source§

impl<'tree> LeafNode<'tree> for NeverType<'tree>

Source§

impl<'tree> LeafNode<'tree> for OuterDocCommentMarker<'tree>

Source§

impl<'tree> LeafNode<'tree> for PrimitiveType<'tree>

Source§

impl<'tree> LeafNode<'tree> for RemainingFieldPattern<'tree>

Source§

impl<'tree> LeafNode<'tree> for SelfType<'tree>

Source§

impl<'tree> LeafNode<'tree> for Shebang<'tree>

Source§

impl<'tree> LeafNode<'tree> for ShorthandFieldIdentifier<'tree>

Source§

impl<'tree> LeafNode<'tree> for StringContent<'tree>

Source§

impl<'tree> LeafNode<'tree> for Super<'tree>

Source§

impl<'tree> LeafNode<'tree> for TypeIdentifier<'tree>

Source§

impl<'tree> LeafNode<'tree> for UnitExpression<'tree>

Source§

impl<'tree> LeafNode<'tree> for UnitType<'tree>