pub struct NoopFoldProvider;Expand description
No-op FoldProvider for hosts that don’t expose folds. Every
row is visible; is_row_hidden always returns false.
Trait Implementations§
Source§impl Clone for NoopFoldProvider
impl Clone for NoopFoldProvider
Source§fn clone(&self) -> NoopFoldProvider
fn clone(&self) -> NoopFoldProvider
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NoopFoldProvider
impl Debug for NoopFoldProvider
Source§impl Default for NoopFoldProvider
impl Default for NoopFoldProvider
Source§fn default() -> NoopFoldProvider
fn default() -> NoopFoldProvider
Returns the “default value” for a type. Read more
Source§impl FoldProvider for NoopFoldProvider
impl FoldProvider for NoopFoldProvider
Source§fn next_visible_row(&self, row: usize, row_count: usize) -> Option<usize>
fn next_visible_row(&self, row: usize, row_count: usize) -> Option<usize>
First visible row strictly after
row, skipping hidden rows.
None past the end of the buffer.Source§fn prev_visible_row(&self, row: usize) -> Option<usize>
fn prev_visible_row(&self, row: usize) -> Option<usize>
First visible row strictly before
row. None past the top.Is
row currently hidden by a closed fold?Source§fn fold_at_row(&self, _row: usize) -> Option<(usize, usize, bool)>
fn fold_at_row(&self, _row: usize) -> Option<(usize, usize, bool)>
Range
(start_row, end_row, closed) of the fold containing
row, if any. Lets za / zo / zc find their target
without iterating the full fold list.Source§fn apply(&mut self, op: FoldOp)
fn apply(&mut self, op: FoldOp)
Apply a
FoldOp to the underlying fold storage. Read-only
providers (e.g. crate::buffer_impl::BufferFoldProvider which
holds a &Buffer) and providers that don’t track folds (e.g.
NoopFoldProvider) implement this as a no-op. Read moreSource§fn invalidate_range(&mut self, start_row: usize, end_row: usize)
fn invalidate_range(&mut self, start_row: usize, end_row: usize)
Drop every fold whose range overlaps
[start_row, end_row].
Edit pipelines call this after a user edit so vim’s “edits
inside a fold open it” behaviour fires. Default impl forwards
to FoldProvider::apply with a FoldOp::Invalidate.impl Copy for NoopFoldProvider
Auto Trait Implementations§
impl Freeze for NoopFoldProvider
impl RefUnwindSafe for NoopFoldProvider
impl Send for NoopFoldProvider
impl Sync for NoopFoldProvider
impl Unpin for NoopFoldProvider
impl UnsafeUnpin for NoopFoldProvider
impl UnwindSafe for NoopFoldProvider
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more