Trait loro_rle::Sliceable

source ·
pub trait Sliceable {
    // Required method
    fn slice(&self, from: usize, to: usize) -> Self;
}
Expand description

NOTE: Sliceable implementation should be coherent with Mergable:

  • For all k, a.slice(0,k).merge(a.slice(k, a.len())) == a

Required Methods§

source

fn slice(&self, from: usize, to: usize) -> Self

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Sliceable for bool

source§

fn slice(&self, _: usize, _: usize) -> Self

source§

impl Sliceable for String

source§

fn slice(&self, from: usize, to: usize) -> Self

source§

impl Sliceable for BytesSlice

source§

fn slice(&self, from: usize, to: usize) -> Self

source§

impl<T: Clone> Sliceable for Vec<T>

source§

fn slice(&self, from: usize, to: usize) -> Self

source§

impl<T: Integer + NumCast + Copy> Sliceable for Range<T>

source§

fn slice(&self, start: usize, end: usize) -> Self

source§

impl<T: HasLength + Sliceable, A: Array<Item = T>> Sliceable for SmallVec<A>

source§

fn slice(&self, from: usize, to: usize) -> Self

Implementors§