Struct modalkit::editing::context::EditContextBuilder

source ·
pub struct EditContextBuilder(/* private fields */);
Expand description

Build a new EditContext.

Implementations§

source§

impl EditContextBuilder

source

pub fn build(self) -> EditContext

Finish building the EditContext.

source

pub fn cursor_end(self, v: CursorEnd) -> Self

Set the CursorEnd.

source

pub fn target_shape(self, v: Option<TargetShape>) -> Self

Set the TargetShape.

source

pub fn insert_style(self, v: Option<InsertStyle>) -> Self

Set the InsertStyle.

source

pub fn last_column(self, v: bool) -> Self

Set whether it’s okay to move the cursor into the last column.

source

pub fn register(self, v: Option<Register>) -> Self

Set the Register.

source

pub fn register_append(self, v: bool) -> Self

Set whether this operation should append contents to the register or replace the existing ones.

source

pub fn search_regex_dir(self, v: MoveDir1D) -> Self

Set the direction the regular expression should search in.

source

pub fn search_char(self, v: Option<(MoveDir1D, bool, Char)>) -> Self

Set a character to search for.

source

pub fn replace_char(self, v: Option<Char>) -> Self

Set a Char to replace existing characters with.

source

pub fn search_incremental(self, v: bool) -> Self

Set whether we should do an incremental search.

source

pub fn mark(self, mark: Option<Mark>) -> Self

Set the contextual Mark.

source

pub fn typed_char(self, ch: Option<Char>) -> Self

Set the contextual Mark.

source

pub fn operation(self, op: EditAction) -> Self

Set the contextual Mark.

source

pub fn count(self, n: Option<usize>) -> Self

Set the contextual count.

Trait Implementations§

source§

impl Default for EditContextBuilder

source§

fn default() -> EditContextBuilder

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

impl From<EditContext> for EditContextBuilder

source§

fn from(ctx: EditContext) -> Self

Converts to this type from the input type.

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