mirror of
https://github.com/loro-dev/loro.git
synced 2025-02-02 11:06:14 +00:00
doc: add sliceable doc
This commit is contained in:
parent
55c274d5ac
commit
7284301ce8
1 changed files with 3 additions and 0 deletions
|
@ -19,6 +19,9 @@ pub trait Mergable<Cfg = ()> {
|
|||
}
|
||||
}
|
||||
|
||||
/// NOTE: [Sliceable] implementation should be coherent with [Mergable]:
|
||||
///
|
||||
/// - For all k, a.slice(0,k).merge(a.slice(k, a.len())) == a
|
||||
pub trait Sliceable {
|
||||
fn slice(&self, from: usize, to: usize) -> Self;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue