ass_editor/commands/delta_commands/
mod.rs1mod batch;
6mod event_edit;
7mod insert;
8mod replace;
9
10#[cfg(test)]
11mod tests;
12
13pub use batch::DeltaBatchCommand;
14pub use event_edit::IncrementalEventEditCommand;
15pub use insert::IncrementalInsertCommand;
16pub use replace::IncrementalReplaceCommand;
17
18use super::CommandResult;
19use crate::core::{EditorDocument, Result};
20
21#[cfg(not(feature = "std"))]
22use alloc::string::String;
23
24pub trait DeltaCommand {
26 fn execute_with_delta(&self, document: &mut EditorDocument) -> Result<super::CommandResult>;
28
29 fn description(&self) -> String;
31
32 fn supports_incremental(&self) -> bool {
34 cfg!(feature = "stream")
35 }
36}