pub trait Posable<F> {
// Required method
fn get_pos(&self) -> &Position<F>;
// Provided methods
fn file(&self) -> &F { ... }
fn line(&self) -> u32 { ... }
fn column(&self) -> u32 { ... }
}Expand description
A trait for objects with an associated position
You can freely implement this trait for your objects or instead use Pos wrapper.