pub trait Edit: Address {
// Required methods
fn insert(&mut self, ix: usize, s: &str);
fn remove(&mut self, from: usize, to: usize);
// Provided methods
fn submatch(&self, m: &Match, n: usize) -> Option<String> { ... }
fn begin_edit_transaction(&mut self) { ... }
fn end_edit_transaction(&mut self) { ... }
}
Expand description
Something that can be edited by a Program
Required Methods§
Provided Methods§
Sourcefn submatch(&self, m: &Match, n: usize) -> Option<String>
fn submatch(&self, m: &Match, n: usize) -> Option<String>
Extract the content of a previous submatch so it can be used in templating
Sourcefn begin_edit_transaction(&mut self)
fn begin_edit_transaction(&mut self)
Mark the start of an edit transaction
Sourcefn end_edit_transaction(&mut self)
fn end_edit_transaction(&mut self)
Mark the end of an edit transaction