Trait GetDisjointMutIndex

unsafe trait GetDisjointMutIndex: Clone + private_get_disjoint_mut_index::Sealed

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: &Self, len: usize) -> bool

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

fn is_overlapping(self: &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