annotated_string/
annotation.rs

1pub trait Annotation: Clone {
2	fn try_merge(&mut self, other: &Self) -> bool;
3}
4impl Annotation for usize {
5	fn try_merge(&mut self, other: &Self) -> bool {
6		if *self != *other {
7			return false;
8		}
9		true
10	}
11}
12
13pub trait ApplyAnnotation<T> {
14	fn apply(&mut self, change: &T);
15}