Trait dprint_core::formatting::tokens::TokenCollection [−][src]
pub trait TokenCollection<'a> {
type TPos: PartialOrd + Copy;
type TToken: 'a;
fn get_start_at_index(&self, index: usize) -> Self::TPos;
fn get_end_at_index(&self, index: usize) -> Self::TPos;
fn get_token_at_index(&self, index: usize) -> &'a Self::TToken;
fn len(&self) -> usize;
fn is_empty(&self) -> bool;
}Expand description
Trait for a collection of tokens.
Associated Types
type TPos: PartialOrd + Copy[src]
type TPos: PartialOrd + Copy[src]The position type the token uses.
Required methods
fn get_start_at_index(&self, index: usize) -> Self::TPos[src]
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]
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]
fn get_token_at_index(&self, index: usize) -> &'a Self::TToken[src]Gets the token at the specified collection index.