pub struct MergeEventsCommand {
pub first_event_index: usize,
pub second_event_index: usize,
pub merge_text_separator: String,
pub description: Option<String>,
}Expand description
Command to merge two consecutive events
Fields§
§first_event_index: usize§second_event_index: usize§merge_text_separator: String§description: Option<String>Implementations§
Source§impl MergeEventsCommand
impl MergeEventsCommand
Sourcepub fn new(first_event_index: usize, second_event_index: usize) -> Self
pub fn new(first_event_index: usize, second_event_index: usize) -> Self
Create a new event merge command
Sourcepub fn with_separator(self, separator: String) -> Self
pub fn with_separator(self, separator: String) -> Self
Set the text separator for merged text
Sourcepub fn with_description(self, description: String) -> Self
pub fn with_description(self, description: String) -> Self
Set a custom description for this command
Trait Implementations§
Source§impl Clone for MergeEventsCommand
impl Clone for MergeEventsCommand
Source§fn clone(&self) -> MergeEventsCommand
fn clone(&self) -> MergeEventsCommand
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 MergeEventsCommand
impl Debug for MergeEventsCommand
Source§impl EditorCommand for MergeEventsCommand
impl EditorCommand for MergeEventsCommand
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
Auto Trait Implementations§
impl Freeze for MergeEventsCommand
impl RefUnwindSafe for MergeEventsCommand
impl Send for MergeEventsCommand
impl Sync for MergeEventsCommand
impl Unpin for MergeEventsCommand
impl UnwindSafe for MergeEventsCommand
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