Struct ra_ap_tt::buffer::Cursor[][src]

pub struct Cursor<'a> { /* fields omitted */ }

A safe version of Cursor from syn crate https://github.com/dtolnay/syn/blob/6533607f91686545cb034d2838beea338d9d0742/src/buffer.rs#L125

Implementations

impl<'a> Cursor<'a>[src]

pub fn eof(self) -> bool[src]

Check whether it is eof

pub fn end(self) -> Option<&'a Subtree>[src]

If the cursor is pointing at the end of a subtree, returns the parent subtree

pub fn subtree(self) -> Option<Cursor<'a>>[src]

If the cursor is pointing at a Subtree, returns a cursor into that subtree

pub fn token_tree(self) -> Option<TokenTreeRef<'a>>[src]

If the cursor is pointing at a TokenTree, returns it

pub fn bump(self) -> Cursor<'a>[src]

Bump the cursor

pub fn bump_subtree(self) -> Cursor<'a>[src]

Bump the cursor, if it is a subtree, returns a cursor into that subtree

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

Check whether it is a top level

Trait Implementations

impl<'a> Clone for Cursor<'a>[src]

impl<'a> Copy for Cursor<'a>[src]

impl<'a> Debug for Cursor<'a>[src]

impl<'a> Eq for Cursor<'a>[src]

impl<'a> PartialEq<Cursor<'a>> for Cursor<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Cursor<'a>

impl<'a> Send for Cursor<'a>

impl<'a> Sync for Cursor<'a>

impl<'a> Unpin for Cursor<'a>

impl<'a> UnwindSafe for Cursor<'a>

Blanket Implementations

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

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

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

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, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

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.