annotated-string 0.3.0

String with ability to annotate (format) its individual fragments
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
pub trait Annotation: Clone {
	fn try_merge(&mut self, other: &Self) -> bool;
}
impl Annotation for usize {
	fn try_merge(&mut self, other: &Self) -> bool {
		if *self != *other {
			return false;
		}
		true
	}
}

pub trait ApplyAnnotation<T> {
	fn apply(&mut self, change: &T);
}