pub struct EditContextBuilder(/* private fields */);Expand description
Build a new EditContext.
Implementations§
Source§impl EditContextBuilder
impl EditContextBuilder
Sourcepub fn build(self) -> EditContext
pub fn build(self) -> EditContext
Finish building the EditContext.
Sourcepub fn cursor_end(self, v: CursorEnd) -> Self
pub fn cursor_end(self, v: CursorEnd) -> Self
Set the CursorEnd.
Defaults to CursorEnd::Auto.
Sourcepub fn target_shape(self, v: Option<TargetShape>) -> Self
pub fn target_shape(self, v: Option<TargetShape>) -> Self
Set the TargetShape.
Defaults to None.
Sourcepub fn insert_style(self, v: Option<InsertStyle>) -> Self
pub fn insert_style(self, v: Option<InsertStyle>) -> Self
Set the InsertStyle.
Defaults to None.
Sourcepub fn last_column(self, v: bool) -> Self
pub fn last_column(self, v: bool) -> Self
Set whether it’s okay to move the cursor into the last column.
Defaults to true.
Sourcepub fn register_append(self, v: bool) -> Self
pub fn register_append(self, v: bool) -> Self
Set whether this operation should append contents to the register or replace the existing ones.
Defaults to false.
Sourcepub fn search_regex_dir(self, v: MoveDir1D) -> Self
pub fn search_regex_dir(self, v: MoveDir1D) -> Self
Set the direction the regular expression should search in.
Defaults to MoveDir1D::Next.
Sourcepub fn search_char(self, v: Option<(MoveDir1D, bool, Char)>) -> Self
pub fn search_char(self, v: Option<(MoveDir1D, bool, Char)>) -> Self
Set a character to search for.
Defaults to None.
Sourcepub fn replace_char(self, v: Option<Char>) -> Self
pub fn replace_char(self, v: Option<Char>) -> Self
Sourcepub fn search_incremental(self, v: bool) -> Self
pub fn search_incremental(self, v: bool) -> Self
Set whether we should do an incremental search.
Defaults to false.
Sourcepub fn operation(self, op: EditAction) -> Self
pub fn operation(self, op: EditAction) -> Self
Set the contextual Mark.
Defaults to EditAction::Motion.
Trait Implementations§
Source§impl Default for EditContextBuilder
impl Default for EditContextBuilder
Source§fn default() -> EditContextBuilder
fn default() -> EditContextBuilder
Returns the “default value” for a type. Read more
Source§impl From<EditContext> for EditContextBuilder
impl From<EditContext> for EditContextBuilder
Source§fn from(ctx: EditContext) -> Self
fn from(ctx: EditContext) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for EditContextBuilder
impl RefUnwindSafe for EditContextBuilder
impl Send for EditContextBuilder
impl Sync for EditContextBuilder
impl Unpin for EditContextBuilder
impl UnwindSafe for EditContextBuilder
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