Trait Resolver

Source
pub trait Resolver {
    // Required method
    fn resolve(&self, offset: TextSize) -> (u32, u32);
}
Expand description

Trait for objects that can resolve offsets to line and column numbers

Required Methods§

Source

fn resolve(&self, offset: TextSize) -> (u32, u32)

Resolve the raw offset into a (line, column) tuple

§Parameters
  • offset: raw offset into the source string

Implementations on Foreign Types§

Source§

impl<'s> Resolver for &'s str

Source§

fn resolve(&self, offset: TextSize) -> (u32, u32)

Implementors§

impl Resolver for ExpandLocation

impl Resolver for LineMap