2021-08-11 08:40:58 +08:00
|
|
|
use crate::{
|
|
|
|
client::{view::insert_ext::*, Document},
|
2021-08-11 11:42:46 +08:00
|
|
|
core::{Attributes, Delta, Interval},
|
2021-08-11 08:40:58 +08:00
|
|
|
};
|
|
|
|
use lazy_static::lazy_static;
|
|
|
|
|
|
|
|
pub trait InsertExt {
|
2021-08-11 11:42:46 +08:00
|
|
|
fn apply(&self, delta: &Delta, s: &str, interval: Interval) -> Delta;
|
2021-08-11 08:40:58 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
pub trait FormatExt {
|
2021-08-11 11:42:46 +08:00
|
|
|
fn apply(&self, document: &Document, interval: Interval, attributes: Attributes);
|
2021-08-11 08:40:58 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
pub trait DeleteExt {
|
2021-08-11 11:42:46 +08:00
|
|
|
fn apply(&self, document: &Document, interval: Interval);
|
2021-08-11 08:40:58 +08:00
|
|
|
}
|