Trait source_span::Metrics [−][src]
pub trait Metrics {
fn char_width(&self, c: char) -> usize;
fn tab_stop(&self) -> usize;
}Gives the size of each character and tab stop length.
This is used to correctly compute spans in the source text,
and render the text using a Formatter.
Required methods
fn char_width(&self, c: char) -> usize[src]
Get the size (width in columns) of a character.
fn tab_stop(&self) -> usize[src]
Get the tab stop length.
Implementors
impl Metrics for DefaultMetrics[src]
impl Metrics for DefaultMetrics[src]