pub trait IsolateIndex<S> {
type Output;
// Required methods
fn try_isolate(self, set: S) -> Option<Self::Output>;
unsafe fn isolate_unchecked(self, set: S) -> Self::Output;
}Expand description
A helper trait like GetIndex but for Isolate types.
Required Associated Types§
Required Methods§
Sourcefn try_isolate(self, set: S) -> Option<Self::Output>
fn try_isolate(self, set: S) -> Option<Self::Output>
Attempts to isolate a value in the given set at this index.
Unlike get this function takes set by value.
Sourceunsafe fn isolate_unchecked(self, set: S) -> Self::Output
unsafe fn isolate_unchecked(self, set: S) -> Self::Output
Attempts to isolate a value in the given set at this index.
§Safety
The index must be within the bounds of the collection to avoid undefined behaviour.
Implementations on Foreign Types§
Source§impl<'a, S, T> IsolateIndex<(S, T)> for usize
impl<'a, S, T> IsolateIndex<(S, T)> for usize
Source§impl<O> IsolateIndex<ClumpedOffsets<O>> for usizewhere
ClumpedOffsets<O>: GetOffset,
impl<O> IsolateIndex<ClumpedOffsets<O>> for usizewhere
ClumpedOffsets<O>: GetOffset,
type Output = usize
unsafe fn isolate_unchecked( self, clumped_offsets: ClumpedOffsets<O>, ) -> Self::Output
fn try_isolate(self, clumped_offsets: ClumpedOffsets<O>) -> Option<Self::Output>
Source§impl<S> IsolateIndex<UniChunked<S, usize>> for usize
impl<S> IsolateIndex<UniChunked<S, usize>> for usize
Source§impl<S> IsolateIndex<UniChunked<S, usize>> for Range<usize>
impl<S> IsolateIndex<UniChunked<S, usize>> for Range<usize>
Source§impl<S> IsolateIndex<S> for RangeFrom<usize>
impl<S> IsolateIndex<S> for RangeFrom<usize>
Source§impl<S> IsolateIndex<S> for RangeFull
impl<S> IsolateIndex<S> for RangeFull
Source§impl<S> IsolateIndex<S> for RangeInclusive<usize>
impl<S> IsolateIndex<S> for RangeInclusive<usize>
Source§impl<S> IsolateIndex<S> for RangeToInclusive<usize>
impl<S> IsolateIndex<S> for RangeToInclusive<usize>
Source§impl<S, I> IsolateIndex<Select<S, I>> for usize
impl<S, I> IsolateIndex<Select<S, I>> for usize
Source§impl<S, I> IsolateIndex<Select<S, I>> for Range<usize>
Isolating a range from a selection will preserve the original target data set.
impl<S, I> IsolateIndex<Select<S, I>> for Range<usize>
Isolating a range from a selection will preserve the original target data set.
Source§impl<S, N> IsolateIndex<UniChunked<S, U<N>>> for usize
impl<S, N> IsolateIndex<UniChunked<S, U<N>>> for usize
Source§fn try_isolate(self, chunked: UniChunked<S, U<N>>) -> Option<Self::Output>
fn try_isolate(self, chunked: UniChunked<S, U<N>>) -> Option<Self::Output>
Isolate a chunk of the given UniChunked collection.
type Output = <S as Isolate<StaticRange<N>>>::Output
unsafe fn isolate_unchecked(self, chunked: UniChunked<S, U<N>>) -> Self::Output
Source§impl<S, N> IsolateIndex<UniChunked<S, U<N>>> for Range<usize>
impl<S, N> IsolateIndex<UniChunked<S, U<N>>> for Range<usize>
Source§fn try_isolate(self, chunked: UniChunked<S, U<N>>) -> Option<Self::Output>
fn try_isolate(self, chunked: UniChunked<S, U<N>>) -> Option<Self::Output>
Isolate a [begin..end) range of the given UniChunked collection.
type Output = UniChunked<<S as Isolate<Range<usize>>>::Output, U<N>>
unsafe fn isolate_unchecked(self, chunked: UniChunked<S, U<N>>) -> Self::Output
Source§impl<S, O> IsolateIndex<Chunked<S, O>> for usize
impl<S, O> IsolateIndex<Chunked<S, O>> for usize
Source§impl<S, O> IsolateIndex<Chunked<S, O>> for Range<usize>
impl<S, O> IsolateIndex<Chunked<S, O>> for Range<usize>
Source§fn try_isolate(self, chunked: Chunked<S, O>) -> Option<Self::Output>
fn try_isolate(self, chunked: Chunked<S, O>) -> Option<Self::Output>
Isolate a [begin..end) range of the given Chunked collection.