[][src]Struct rowan::syntax::Text

pub struct Text { /* fields omitted */ }

Text of a node in the syntax tree.

Methods

impl Text[src]

pub fn node(&self) -> &Node<Generic>[src]

This node.

pub fn range(&self) -> StrRange[src]

Range of this text.

pub fn len(&self) -> StrIndex[src]

Length of this text.

pub fn is_empty(&self) -> bool[src]

Is this text empty?

impl Text[src]

pub fn leaves<Lang: Language>(
    &self,
    lang: Lang
) -> impl Iterator<Item = (Node<Lang>, &str)>
[src]

The leaf nodes that make up this text.

pub fn chunks(&self) -> impl Iterator<Item = &str>[src]

The text fragments that make up this text.

pub fn slice(&self, range: impl Into<StrRange>) -> Text[src]

Slice a subset of this text.

Trait Implementations

impl Clone for Text[src]

impl PartialEq<str> for Text[src]

impl ToString for Text[src]

impl Debug for Text[src]

Auto Trait Implementations

impl !Send for Text

impl !Sync for Text

impl Unpin for Text

impl !UnwindSafe for Text

impl !RefUnwindSafe for Text

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erasable for T[src]