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) -> boolReturns
trueifselfis in bounds forlenslice elements.fn is_overlapping(self: &Self, other: &Self) -> boolReturns
trueifselfoverlaps withother.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
impl GetDisjointMutIndex for usizeimpl GetDisjointMutIndex for range::RangeInclusive<usize>impl GetDisjointMutIndex for range::Range<usize>impl GetDisjointMutIndex for crate::ops::RangeInclusive<usize>impl GetDisjointMutIndex for crate::ops::Range<usize>