Trait dprint_core::formatting::tokens::TokenCollection [−][src]
Trait for a collection of tokens.
Associated Types
type TPos: PartialOrd + Copy[src]
The position type the token uses.
type TToken: 'a[src]
The token type.
Required methods
fn get_start_at_index(&self, index: usize) -> Self::TPos[src]
Gets the start position at the specified collection index.
fn get_end_at_index(&self, index: usize) -> Self::TPos[src]
Gets the end position at the specified collection index.
fn get_token_at_index(&self, index: usize) -> &'a Self::TToken[src]
Gets the token at the specified collection index.
fn len(&self) -> usize[src]
Gets the length of the collection.
fn is_empty(&self) -> bool[src]
Gets if the collection is empty.