EditContext

Struct EditContext 

Source
pub struct EditContext { /* private fields */ }
Expand description

Context for editing operations.

Implementations§

Source§

impl EditContext

Source

pub fn get_cursor_end(&self) -> CursorEnd

Indicates where to leave the cursor after editing text.

Source

pub fn get_target_shape(&self) -> Option<TargetShape>

Indicates a shape to be applied to an EditAction.

Source

pub fn get_insert_style(&self) -> Option<InsertStyle>

Indicates the style by which text should be inserted into the buffer.

Source

pub fn get_last_column(&self) -> bool

Indicates whether it is okay to move the cursor into the last column of a line.

Source

pub fn get_count(&self) -> Option<usize>

Indicates a count added to the context (if there is one).

Source

pub fn get_register(&self) -> Option<Register>

Indicates which register yanked and deleted text should go to.

Source

pub fn get_register_append(&self) -> bool

Indicates whether should be appended to the target register when yanking or deleting text.

Source

pub fn get_search_regex_dir(&self) -> MoveDir1D

Get the direction in which to search.

Source

pub fn get_search_char(&self) -> Option<(MoveDir1D, bool, Char)>

Returns a character to search for on the current line, and the direction in which to search.

Source

pub fn get_replace_char(&self) -> Option<Char>

Returns a character to use when performing an EditAction::Replace operation.

Source

pub fn is_search_incremental(&self) -> bool

Whether to perform incremental searches while typing in the search bar.

Trait Implementations§

Source§

impl Clone for EditContext

Source§

fn clone(&self) -> EditContext

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 EditContext

Source§

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

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

impl Default for EditContext

Source§

fn default() -> Self

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

impl PartialEq for EditContext

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Resolve<Count, usize> for EditContext

Source§

fn resolve(&self, count: &Count) -> usize

Use contextual information to convert a T into an R.
Source§

impl Resolve<Specifier<Char>, Option<Char>> for EditContext

Source§

fn resolve(&self, c: &Specifier<Char>) -> Option<Char>

Use contextual information to convert a T into an R.
Source§

impl Resolve<Specifier<EditAction>, EditAction> for EditContext

Source§

fn resolve(&self, mark: &Specifier<EditAction>) -> EditAction

Use contextual information to convert a T into an R.
Source§

impl Resolve<Specifier<Mark>, Mark> for EditContext

Source§

fn resolve(&self, mark: &Specifier<Mark>) -> Mark

Use contextual information to convert a T into an R.
Source§

impl Eq for EditContext

Source§

impl StructuralPartialEq for EditContext

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