Trait ad_editor::exec::Edit

source ·
pub trait Edit: Address {
    // Required methods
    fn contents(&self) -> String;
    fn insert(&mut self, ix: usize, s: &str);
    fn remove(&mut self, from: usize, to: usize);

    // Provided methods
    fn begin_edit_transaction(&mut self) { ... }
    fn end_edit_transaction(&mut self) { ... }
}
Expand description

Something that can be edited by a Program

Required Methods§

source

fn contents(&self) -> String

source

fn insert(&mut self, ix: usize, s: &str)

source

fn remove(&mut self, from: usize, to: usize)

Provided Methods§

Implementors§