pub enum TextEffect {
Mutates,
Preserves,
}Expand description
Whether an action can change buffer TEXT.
This exists so that anything cached against the buffer’s contents — today
the search-match set, tomorrow anything else derived from it — is
invalidated by construction rather than by remembering to. Search
highlights were stale after every edit precisely because that invalidation
was a thing to remember: SearchState::refresh existed and had zero
callers, so inserting four characters repainted the highlight four columns
off.
Variants§
Mutates
May edit the active buffer. Derived state must be recomputed.
Preserves
Cannot edit the active buffer.
Trait Implementations§
Source§impl Clone for TextEffect
impl Clone for TextEffect
Source§fn clone(&self) -> TextEffect
fn clone(&self) -> TextEffect
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TextEffect
Source§impl Debug for TextEffect
impl Debug for TextEffect
impl Eq for TextEffect
Source§impl PartialEq for TextEffect
impl PartialEq for TextEffect
impl StructuralPartialEq for TextEffect
Auto Trait Implementations§
impl Freeze for TextEffect
impl RefUnwindSafe for TextEffect
impl Send for TextEffect
impl Sync for TextEffect
impl Unpin for TextEffect
impl UnsafeUnpin for TextEffect
impl UnwindSafe for TextEffect
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