Trait ad_editor::exec::IterBoundedChars

source ·
pub trait IterBoundedChars {
    // Required methods
    fn iter_between(&self, from: usize, to: usize) -> CharIter<'_>;
    fn rev_iter_between(&self, from: usize, to: usize) -> CharIter<'_>;
}
Expand description

Something that can yield characters between two offsets from within a piece of text.

To avoid boxing, the return of the methods provided by this trait are an enum rather than a trait object.

Required Methods§

source

fn iter_between(&self, from: usize, to: usize) -> CharIter<'_>

Iterate forward: from -> to

This should be an inclusive range from..=to

source

fn rev_iter_between(&self, from: usize, to: usize) -> CharIter<'_>

Iterate backward: from -> to

This should be an inclusive range from..=to

Implementors§