Enum modalkit::prelude::WordStyle

source ·
pub enum WordStyle {
    AlphaNum,
    Big,
    CharSet(fn(_: char) -> bool),
    FileName,
    FilePath,
    Little,
    NonAlphaNum,
    Number(Radix),
    Whitespace(bool),
}
Expand description

The different ways of grouping a buffer’s contents into words.

Variants§

§

AlphaNum

A run of alphanumeric characters.

§

Big

A sequence of non-blank characters.

An empty line is also a Big word. Vim calls this a WORD.

§

CharSet(fn(_: char) -> bool)

A sequence of characters that match a test function.

§

FileName

A name of a directory or file.

§

FilePath

A path to a directory or file.

§

Little

Either a sequence of alphanumeric characters and underscores, or a sequence of other non-blank characters.

An empty line is also a Little word.

§

NonAlphaNum

A run of non-alphanumeric characters.

§

Number(Radix)

A run of digits in the given base, with an optional leading hyphen.

§

Whitespace(bool)

A run of blank characters.

bool controls whether this crosses line boundaries.

Trait Implementations§

source§

impl BoundaryTest for WordStyle

source§

fn is_boundary_begin(&self, ctx: &BoundaryTestContext) -> bool

Check whether we are at the beginning of the range.
source§

fn is_boundary_end(&self, ctx: &BoundaryTestContext) -> bool

Check whether we are at the end of the range.
source§

fn is_boundary(&self, terminus: MoveTerminus, ctx: &BoundaryTestContext) -> bool

Check whether we are at the given side of the range.
source§

impl Clone for WordStyle

source§

fn clone(&self) -> WordStyle

Returns a copy 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 WordStyle

source§

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

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

impl PartialEq for WordStyle

source§

fn eq(&self, other: &WordStyle) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Eq for WordStyle

source§

impl StructuralPartialEq for WordStyle

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> 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> ToOwned for T
where T: Clone,

§

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>,

§

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>,

§

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

impl<T> Any for T
where T: Any,

source§

impl<T> CloneAny for T
where T: Any + Clone,

source§

impl<T> CloneAnySend for T
where T: Any + Send + Clone,

source§

impl<T> CloneAnySendSync for T
where T: Any + Send + Sync + Clone,

source§

impl<T> CloneAnySync for T
where T: Any + Sync + Clone,