pub trait Address: IterBoundedChars {
// Required methods
fn current_dot(&self) -> Dot;
fn len_chars(&self) -> usize;
fn line_to_char(&self, line_idx: usize) -> Option<usize>;
fn char_to_line(&self, char_idx: usize) -> Option<usize>;
fn char_to_line_end(&self, char_idx: usize) -> Option<usize>;
fn char_to_line_start(&self, char_idx: usize) -> Option<usize>;
// Provided methods
fn max_iter(&self) -> usize { ... }
fn map_addr(&self, a: &mut Addr) -> Dot { ... }
fn full_line(&self, line_idx: usize) -> Option<Dot> { ... }
fn map_simple_addr(
&self,
addr: &mut SimpleAddr,
cur_dot: Dot,
) -> Option<Dot> { ... }
fn map_compound_addr(
&self,
from: &mut SimpleAddr,
to: &mut SimpleAddr,
) -> Option<Dot> { ... }
}Expand description
Something that is capable of resolving an Addr to a Dot
Required Methods§
sourcefn current_dot(&self) -> Dot
fn current_dot(&self) -> Dot
This only really makes sense for use with a buffer but is supported so that don’t need to special case running programs against an in-editor buffer vs stdin or a file read from disk.