[−][src]Trait dprint_core::formatting::tokens::TokenCollection
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
pub fn get_start_at_index(&self, index: usize) -> Self::TPos[src]
Gets the start position at the specified collection index.
pub fn get_end_at_index(&self, index: usize) -> Self::TPos[src]
Gets the end position at the specified collection index.
pub fn get_token_at_index(&self, index: usize) -> &'a Self::TToken[src]
Gets the token at the specified collection index.
pub fn len(&self) -> usize[src]
Gets the length of the collection.
pub fn is_empty(&self) -> bool[src]
Gets if the collection is empty.