pub struct ReplaceTextCommand {
pub range: Range,
pub new_text: String,
pub description: Option<String>,
}Expand description
Text replacement command
Fields§
§range: RangeRange of text to replace
new_text: StringNew text to insert
description: Option<String>Optional description override
Implementations§
Trait Implementations§
Source§impl Clone for ReplaceTextCommand
impl Clone for ReplaceTextCommand
Source§fn clone(&self) -> ReplaceTextCommand
fn clone(&self) -> ReplaceTextCommand
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ReplaceTextCommand
impl Debug for ReplaceTextCommand
Source§impl EditorCommand for ReplaceTextCommand
impl EditorCommand for ReplaceTextCommand
Source§fn execute(&self, document: &mut EditorDocument) -> Result<CommandResult>
fn execute(&self, document: &mut EditorDocument) -> Result<CommandResult>
Execute the command on the given document Read more
Source§fn description(&self) -> &str
fn description(&self) -> &str
Get a human-readable description of the command
Source§fn memory_usage(&self) -> usize
fn memory_usage(&self) -> usize
Get the estimated memory usage of this command Read more
Source§fn modifies_content(&self) -> bool
fn modifies_content(&self) -> bool
Check if this command modifies document content Read more
Source§impl PartialEq for ReplaceTextCommand
impl PartialEq for ReplaceTextCommand
impl Eq for ReplaceTextCommand
impl StructuralPartialEq for ReplaceTextCommand
Auto Trait Implementations§
impl Freeze for ReplaceTextCommand
impl RefUnwindSafe for ReplaceTextCommand
impl Send for ReplaceTextCommand
impl Sync for ReplaceTextCommand
impl Unpin for ReplaceTextCommand
impl UnwindSafe for ReplaceTextCommand
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