pub enum Stickiness {
AlwaysGrows,
NeverGrows,
GrowsOnlyBefore,
GrowsOnlyAfter,
}Expand description
The four stickiness modes, stored as what they are: a named pair of
Biases, one per boundary marker.
The mode names describe how the range reacts to an insertion at one of its
edges: AlwaysGrows swallows text inserted at either edge, NeverGrows
rejects both, and the two GrowsOnly* modes swallow at exactly one edge.
Typing strictly inside a range always grows it regardless of mode —
stickiness only decides the edges.
Variants§
AlwaysGrows
Grows at both edges: (Left, Right). Active snippet placeholder.
NeverGrows
Grows at neither edge: (Right, Left). Diagnostics, find matches,
inactive snippet stops.
GrowsOnlyBefore
Grows only at its start: (Left, Left). Caret at end-of-line.
GrowsOnlyAfter
Grows only at its end: (Right, Right). A trailing caret.
Implementations§
Trait Implementations§
Source§impl Clone for Stickiness
impl Clone for Stickiness
Source§fn clone(&self) -> Stickiness
fn clone(&self) -> Stickiness
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 Stickiness
Source§impl Debug for Stickiness
impl Debug for Stickiness
impl Eq for Stickiness
Source§impl PartialEq for Stickiness
impl PartialEq for Stickiness
impl StructuralPartialEq for Stickiness
Auto Trait Implementations§
impl Freeze for Stickiness
impl RefUnwindSafe for Stickiness
impl Send for Stickiness
impl Sync for Stickiness
impl Unpin for Stickiness
impl UnsafeUnpin for Stickiness
impl UnwindSafe for Stickiness
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.