pub struct TokenTreesView<'a> {
pub(crate) repr: TokenTreesReprRef<'a>,
pub(crate) span_parts: &'a [CompressedSpanPart],
}Fields§
§repr: TokenTreesReprRef<'a>§span_parts: &'a [CompressedSpanPart]Implementations§
Source§impl<'a> TokenTreesView<'a>
impl<'a> TokenTreesView<'a>
pub fn empty() -> Self
pub fn iter(&self) -> TtIter<'a> ⓘ
pub fn cursor(&self) -> Cursor<'a>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn try_into_subtree(self) -> Option<SubtreeView<'a>>
pub fn strip_invisible(self) -> TokenTreesView<'a>
pub fn split( self, split_fn: impl FnMut(TtElement<'a>) -> bool, ) -> impl Iterator<Item = TokenTreesView<'a>>
pub fn first_span(&self) -> Option<Span>
pub fn last_span(&self) -> Option<Span>
pub fn iter_flat_tokens( self, ) -> impl ExactSizeIterator<Item = TokenTree> + use<'a>
Trait Implementations§
Source§impl<'a> Clone for TokenTreesView<'a>
impl<'a> Clone for TokenTreesView<'a>
Source§fn clone(&self) -> TokenTreesView<'a>
fn clone(&self) -> TokenTreesView<'a>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TokenTreesView<'_>
impl Debug for TokenTreesView<'_>
Source§impl Display for TokenTreesView<'_>
impl Display for TokenTreesView<'_>
impl<'a> Copy for TokenTreesView<'a>
Auto Trait Implementations§
impl<'a> Freeze for TokenTreesView<'a>
impl<'a> !RefUnwindSafe for TokenTreesView<'a>
impl<'a> Send for TokenTreesView<'a>
impl<'a> Sync for TokenTreesView<'a>
impl<'a> Unpin for TokenTreesView<'a>
impl<'a> !UnwindSafe for TokenTreesView<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more