doc: add sliceable doc

This commit is contained in:
Zixuan Chen 2022-10-22 23:01:55 +08:00
parent 55c274d5ac
commit 7284301ce8

View file

@ -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;
}