Trait GetDisjointMutIndex

pub unsafe trait GetDisjointMutIndex: Clone

A helper trait for <[T]>::get_disjoint_mut().

Safety

If is_in_bounds() returns true and is_overlapping() returns false, it must be safe to index the slice with the indices.

Required Methods

fn is_in_bounds(&self, len: usize) -> bool

Returns true if self is in bounds for len slice elements.

fn is_overlapping(&self, other: &Self) -> bool

Returns true if self overlaps with other.

Note that we don't consider zero-length ranges to overlap at the beginning or the end, but do consider them to overlap in the middle.

Implementors