Struct futures_await_synom::cursor::Cursor [] [src]

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

A cursor into an input TokenStream's data. This cursor holds a reference into the immutable data which is used internally to represent a TokenStream, and can be efficiently manipulated and copied around.

An empty Cursor can be created directly, or one may create a SynomBuffer object and get a cursor to its first token with begin().

Two cursors are equal if they have the same location in the same input stream, and have the same scope.

Methods

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

[src]

Create a cursor referencing a static empty TokenStream.

[src]

Check if the cursor is currently pointing at the end of its valid scope.

[src]

If the cursor is pointing at a Seq with the given Delimiter, return a cursor into that sequence, and one pointing to the next TokenTree.

[src]

If the cursor is pointing at a Term, return it and a cursor pointing at the next TokenTree.

[src]

If the cursor is pointing at an Op, return it and a cursor pointing at the next TokenTree.

[src]

If the cursor is pointing at a Literal, return it and a cursor pointing at the next TokenTree.

[src]

Copy all remaining tokens visible from this cursor into a TokenStream.

[src]

If the cursor is looking at a TokenTree, returns it along with a cursor pointing to the next token in the sequence, otherwise returns None.

This method does not treat None-delimited sequences as invisible, and will return a Group(None, ..) if the cursor is looking at one.

Trait Implementations

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

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

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

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

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

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

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

[src]

Formats the value using the given formatter.