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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,