Struct modalkit::editing::context::EditContextBuilder
source · 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.
sourcepub fn target_shape(self, v: Option<TargetShape>) -> Self
pub fn target_shape(self, v: Option<TargetShape>) -> Self
Set the TargetShape.
sourcepub fn insert_style(self, v: Option<InsertStyle>) -> Self
pub fn insert_style(self, v: Option<InsertStyle>) -> Self
Set the InsertStyle.
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.
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.
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.
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.
sourcepub fn replace_char(self, v: Option<Char>) -> Self
pub fn replace_char(self, v: Option<Char>) -> Self
Set a Char to replace existing characters with.
sourcepub fn search_incremental(self, v: bool) -> Self
pub fn search_incremental(self, v: bool) -> Self
Set whether we should do an incremental search.
sourcepub fn typed_char(self, ch: Option<Char>) -> Self
pub fn typed_char(self, ch: Option<Char>) -> Self
Set the contextual Mark.
sourcepub fn operation(self, op: EditAction) -> Self
pub fn operation(self, op: EditAction) -> Self
Set the contextual Mark.
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
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.