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 Comment<'tree>

Source§

impl<'tree> LeafNode<'tree> for DebuggerStatement<'tree>

Source§

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

Source§

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

Source§

impl<'tree> LeafNode<'tree> for False<'tree>

Source§

impl<'tree> LeafNode<'tree> for HashBangLine<'tree>

Source§

impl<'tree> LeafNode<'tree> for HtmlCharacterReference<'tree>

Source§

impl<'tree> LeafNode<'tree> for HtmlComment<'tree>

Source§

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

Source§

impl<'tree> LeafNode<'tree> for Import<'tree>

Source§

impl<'tree> LeafNode<'tree> for JsxText<'tree>

Source§

impl<'tree> LeafNode<'tree> for MetaProperty<'tree>

Source§

impl<'tree> LeafNode<'tree> for Null<'tree>

Source§

impl<'tree> LeafNode<'tree> for Number<'tree>

Source§

impl<'tree> LeafNode<'tree> for OptionalChain<'tree>

Source§

impl<'tree> LeafNode<'tree> for PrivatePropertyIdentifier<'tree>

Source§

impl<'tree> LeafNode<'tree> for PropertyIdentifier<'tree>

Source§

impl<'tree> LeafNode<'tree> for RegexFlags<'tree>

Source§

impl<'tree> LeafNode<'tree> for RegexPattern<'tree>

Source§

impl<'tree> LeafNode<'tree> for ShorthandPropertyIdentifier<'tree>

Source§

impl<'tree> LeafNode<'tree> for ShorthandPropertyIdentifierPattern<'tree>

Source§

impl<'tree> LeafNode<'tree> for StatementIdentifier<'tree>

Source§

impl<'tree> LeafNode<'tree> for StringFragment<'tree>

Source§

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

Source§

impl<'tree> LeafNode<'tree> for This<'tree>

Source§

impl<'tree> LeafNode<'tree> for True<'tree>

Source§

impl<'tree> LeafNode<'tree> for Undefined<'tree>