Trait lang_util::located::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§