Skip to main content

NoopFoldProvider

Struct NoopFoldProvider 

Source
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

Source§

fn clone(&self) -> NoopFoldProvider

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for NoopFoldProvider

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for NoopFoldProvider

Source§

fn default() -> NoopFoldProvider

Returns the “default value” for a type. Read more
Source§

impl FoldProvider for NoopFoldProvider

Source§

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>

First visible row strictly before row. None past the top.
Source§

fn is_row_hidden(&self, _row: usize) -> bool

Is row currently hidden by a closed fold?
Source§

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)

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 more
Source§

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.
Source§

impl Copy for NoopFoldProvider

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.