extension.rs 390 B

12345678910111213
  1. use crate::core::{Attribute, Delta, Interval};
  2. pub trait InsertExt {
  3. fn apply(&self, delta: &Delta, replace_len: usize, text: &str, index: usize) -> Option<Delta>;
  4. }
  5. pub trait FormatExt {
  6. fn apply(&self, delta: &Delta, interval: Interval, attribute: &Attribute) -> Option<Delta>;
  7. }
  8. pub trait DeleteExt {
  9. fn apply(&self, delta: &Delta, interval: Interval) -> Option<Delta>;
  10. }