DocumentCommandExt

Trait DocumentCommandExt 

Source
pub trait DocumentCommandExt {
    // Required methods
    fn command(&mut self) -> TextCommand<'_>;
    fn insert_at(
        &mut self,
        position: Position,
        text: &str,
    ) -> Result<CommandResult>;
    fn delete_range(&mut self, range: Range) -> Result<CommandResult>;
    fn replace_range(
        &mut self,
        range: Range,
        text: &str,
    ) -> Result<CommandResult>;
}

Required Methods§

Source

fn command(&mut self) -> TextCommand<'_>

Start a fluent command chain

Source

fn insert_at(&mut self, position: Position, text: &str) -> Result<CommandResult>

Quick insert at position

Source

fn delete_range(&mut self, range: Range) -> Result<CommandResult>

Quick delete range

Source

fn replace_range(&mut self, range: Range, text: &str) -> Result<CommandResult>

Quick replace range

Implementors§