pub struct Bookmarks { /* private fields */ }Expand description
The marked lines of one document, sorted and without repeats.
Implementations§
Source§impl Bookmarks
impl Bookmarks
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
pub fn contains(&self, line: usize) -> bool
Sourcepub fn set(&mut self, lines: impl IntoIterator<Item = usize>, line_count: usize)
pub fn set(&mut self, lines: impl IntoIterator<Item = usize>, line_count: usize)
Replaces the marks with lines; lines past the last of line_count
are dropped.
Sourcepub fn toggle(&mut self, line: usize) -> bool
pub fn toggle(&mut self, line: usize) -> bool
Marks line if it is unmarked, else unmarks it; returns whether it
is marked now.
pub fn clear(&mut self)
Sourcepub fn next_after(&self, line: usize) -> Option<usize>
pub fn next_after(&self, line: usize) -> Option<usize>
The first marked line after line, else the first one (wrapping
around, as F2 does).
Sourcepub fn prev_before(&self, line: usize) -> Option<usize>
pub fn prev_before(&self, line: usize) -> Option<usize>
The last marked line before line, else the last one.
Trait Implementations§
impl Eq for Bookmarks
impl StructuralPartialEq for Bookmarks
Auto Trait Implementations§
impl Freeze for Bookmarks
impl RefUnwindSafe for Bookmarks
impl Send for Bookmarks
impl Sync for Bookmarks
impl Unpin for Bookmarks
impl UnsafeUnpin for Bookmarks
impl UnwindSafe for Bookmarks
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more