IsolateIndex

Trait IsolateIndex 

Source
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§

Source

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.

Source

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
where S: Isolate<usize>, T: Isolate<usize>,

Source§

type Output = (<S as Isolate<usize>>::Output, <T as Isolate<usize>>::Output)

Source§

unsafe fn isolate_unchecked(self, (s, t): (S, T)) -> Self::Output

Source§

fn try_isolate(self, (s, t): (S, T)) -> Option<Self::Output>

Source§

impl<'a, S, T> IsolateIndex<(S, T)> for Range<usize>
where S: Isolate<Range<usize>>, T: Isolate<Range<usize>>,

Source§

type Output = (<S as Isolate<Range<usize>>>::Output, <T as Isolate<Range<usize>>>::Output)

Source§

unsafe fn isolate_unchecked(self, (s, t): (S, T)) -> Self::Output

Source§

fn try_isolate(self, (s, t): (S, T)) -> Option<Self::Output>

Source§

impl<O> IsolateIndex<ClumpedOffsets<O>> for usize

Source§

type Output = usize

Source§

unsafe fn isolate_unchecked( self, clumped_offsets: ClumpedOffsets<O>, ) -> Self::Output

Source§

fn try_isolate(self, clumped_offsets: ClumpedOffsets<O>) -> Option<Self::Output>

Source§

impl<O: Isolate<usize>> IsolateIndex<Offsets<O>> for usize

Source§

type Output = <O as Isolate<usize>>::Output

Source§

unsafe fn isolate_unchecked(self, offsets: Offsets<O>) -> Self::Output

Source§

fn try_isolate(self, offsets: Offsets<O>) -> Option<Self::Output>

Source§

impl<O: Isolate<Range<usize>>> IsolateIndex<Offsets<O>> for Range<usize>

Source§

type Output = Offsets<<O as Isolate<Range<usize>>>::Output>

Source§

unsafe fn isolate_unchecked(self, offsets: Offsets<O>) -> Self::Output

Source§

fn try_isolate(self, offsets: Offsets<O>) -> Option<Self::Output>

Source§

impl<S> IsolateIndex<UniChunked<S, usize>> for usize
where S: Set + Isolate<Range<usize>>,

Source§

fn try_isolate(self, chunked: ChunkedN<S>) -> Option<Self::Output>

Isolate a chunk of the given ChunkedN collection.

Source§

type Output = <S as Isolate<Range<usize>>>::Output

Source§

unsafe fn isolate_unchecked(self, chunked: ChunkedN<S>) -> Self::Output

Source§

impl<S> IsolateIndex<UniChunked<S, usize>> for Range<usize>
where S: Set + Isolate<Range<usize>>,

Source§

fn try_isolate(self, chunked: ChunkedN<S>) -> Option<Self::Output>

Isolate a [begin..end) range of the given ChunkedN collection.

Source§

type Output = UniChunked<<S as Isolate<Range<usize>>>::Output, usize>

Source§

unsafe fn isolate_unchecked(self, chunked: ChunkedN<S>) -> Self::Output

Source§

impl<S> IsolateIndex<S> for RangeFrom<usize>

Source§

type Output = <Range<usize> as IsolateIndex<S>>::Output

Source§

unsafe fn isolate_unchecked(self, set: S) -> Self::Output

Source§

fn try_isolate(self, set: S) -> Option<Self::Output>

Source§

impl<S> IsolateIndex<S> for RangeFull

Source§

type Output = <Range<usize> as IsolateIndex<S>>::Output

Source§

unsafe fn isolate_unchecked(self, set: S) -> Self::Output

Source§

fn try_isolate(self, set: S) -> Option<Self::Output>

Source§

impl<S> IsolateIndex<S> for RangeInclusive<usize>

Source§

type Output = <Range<usize> as IsolateIndex<S>>::Output

Source§

unsafe fn isolate_unchecked(self, set: S) -> Self::Output

Source§

fn try_isolate(self, set: S) -> Option<Self::Output>

Source§

impl<S> IsolateIndex<S> for RangeToInclusive<usize>

Source§

type Output = <Range<usize> as IsolateIndex<S>>::Output

Source§

unsafe fn isolate_unchecked(self, set: S) -> Self::Output

Source§

fn try_isolate(self, set: S) -> Option<Self::Output>

Source§

impl<S, I> IsolateIndex<Select<S, I>> for usize
where I: Isolate<usize>, <I as Isolate<usize>>::Output: Borrow<usize>, S: Isolate<usize>,

Source§

type Output = (<I as Isolate<usize>>::Output, <S as Isolate<usize>>::Output)

Source§

unsafe fn isolate_unchecked(self, selection: Select<S, I>) -> Self::Output

Source§

fn try_isolate(self, selection: Select<S, I>) -> Option<Self::Output>

Source§

impl<S, I> IsolateIndex<Select<S, I>> for Range<usize>
where I: Isolate<Range<usize>>,

Isolating a range from a selection will preserve the original target data set.

Source§

type Output = Select<S, <I as Isolate<Range<usize>>>::Output>

Source§

unsafe fn isolate_unchecked(self, selection: Select<S, I>) -> Self::Output

Source§

fn try_isolate(self, selection: Select<S, I>) -> Option<Self::Output>

Source§

impl<S, N> IsolateIndex<UniChunked<S, U<N>>> for usize
where S: Set + Isolate<StaticRange<N>>, N: Unsigned,

Source§

fn try_isolate(self, chunked: UniChunked<S, U<N>>) -> Option<Self::Output>

Isolate a chunk of the given UniChunked collection.

Source§

type Output = <S as Isolate<StaticRange<N>>>::Output

Source§

unsafe fn isolate_unchecked(self, chunked: UniChunked<S, U<N>>) -> Self::Output

Source§

impl<S, N> IsolateIndex<UniChunked<S, U<N>>> for Range<usize>
where S: Set + Isolate<Range<usize>>, N: Unsigned + Default,

Source§

fn try_isolate(self, chunked: UniChunked<S, U<N>>) -> Option<Self::Output>

Isolate a [begin..end) range of the given UniChunked collection.

Source§

type Output = UniChunked<<S as Isolate<Range<usize>>>::Output, U<N>>

Source§

unsafe fn isolate_unchecked(self, chunked: UniChunked<S, U<N>>) -> Self::Output

Source§

impl<S, O> IsolateIndex<Chunked<S, O>> for usize
where S: Set + Isolate<Range<usize>>, O: IndexRange,

Source§

fn try_isolate(self, chunked: Chunked<S, O>) -> Option<Self::Output>

Isolate a single chunk of the given Chunked collection.

Source§

type Output = <S as Isolate<Range<usize>>>::Output

Source§

unsafe fn isolate_unchecked(self, chunked: Chunked<S, O>) -> Self::Output

Source§

impl<S, O> IsolateIndex<Chunked<S, O>> for Range<usize>

Source§

fn try_isolate(self, chunked: Chunked<S, O>) -> Option<Self::Output>

Isolate a [begin..end) range of the given Chunked collection.

Source§

type Output = Chunked<<S as Isolate<Range<usize>>>::Output, <O as Isolate<Range<usize>>>::Output>

Source§

unsafe fn isolate_unchecked(self, chunked: Chunked<S, O>) -> Self::Output

Source§

impl<S, O> IsolateIndex<Subset<S, O>> for usize
where O: AsRef<[usize]>, S: Isolate<usize>,

Source§

type Output = <S as Isolate<usize>>::Output

Source§

unsafe fn isolate_unchecked(self, subset: Subset<S, O>) -> Self::Output

Source§

fn try_isolate(self, subset: Subset<S, O>) -> Option<Self::Output>

Source§

impl<S, T, I> IsolateIndex<Sparse<S, T, I>> for usize

Source§

type Output = (<I as Isolate<usize>>::Output, <S as Isolate<usize>>::Output, <T as Isolate<usize>>::Output)

Source§

unsafe fn isolate_unchecked(self, sparse: Sparse<S, T, I>) -> Self::Output

Source§

fn try_isolate(self, sparse: Sparse<S, T, I>) -> Option<Self::Output>

Source§

impl<S, T, I> IsolateIndex<Sparse<S, T, I>> for Range<usize>
where S: Isolate<Range<usize>>, I: Isolate<Range<usize>>,

Source§

type Output = Sparse<<S as Isolate<Range<usize>>>::Output, T, <I as Isolate<Range<usize>>>::Output>

Source§

unsafe fn isolate_unchecked(self, sparse: Sparse<S, T, I>) -> Self::Output

Source§

fn try_isolate(self, sparse: Sparse<S, T, I>) -> Option<Self::Output>

Source§

impl<S: ValueType> IsolateIndex<S> for RangeTo<usize>

Source§

type Output = <Range<usize> as IsolateIndex<S>>::Output

Source§

unsafe fn isolate_unchecked(self, set: S) -> Self::Output

Source§

fn try_isolate(self, set: S) -> Option<Self::Output>

Source§

impl<T: IntBound> IsolateIndex<Range<T>> for usize

Source§

type Output = T

Source§

unsafe fn isolate_unchecked(self, rng: Range<T>) -> Self::Output

Source§

fn try_isolate(self, rng: Range<T>) -> Option<Self::Output>

Source§

impl<T: IntBound> IsolateIndex<Range<T>> for Range<usize>

Source§

type Output = Range<T>

Source§

unsafe fn isolate_unchecked(self, rng: Range<T>) -> Self::Output

Source§

fn try_isolate(self, rng: Range<T>) -> Option<Self::Output>

Source§

impl<T: IntBound> IsolateIndex<RangeTo<T>> for usize

Source§

type Output = T

Source§

unsafe fn isolate_unchecked(self, _: RangeTo<T>) -> Self::Output

Source§

fn try_isolate(self, rng: RangeTo<T>) -> Option<Self::Output>

Source§

impl<T: IntBound> IsolateIndex<RangeTo<T>> for Range<usize>

Source§

type Output = Range<T>

Source§

unsafe fn isolate_unchecked(self, _: RangeTo<T>) -> Self::Output

Source§

fn try_isolate(self, rng: RangeTo<T>) -> Option<Self::Output>

Implementors§

Source§

impl<'a, T, I> IsolateIndex<&'a [T]> for I
where I: SliceIndex<[T]>, <I as SliceIndex<[T]>>::Output: 'a,

Source§

type Output = &'a <[T] as Index<I>>::Output

Source§

impl<'a, T, I> IsolateIndex<&'a mut [T]> for I
where I: SliceIndex<[T]>, <I as SliceIndex<[T]>>::Output: 'a,

Source§

type Output = &'a mut <[T] as Index<I>>::Output

Source§

impl<'a, T, N> IsolateIndex<&'a [T; 1]> for StaticRange<N>
where N: Unsigned + Array<T>, <N as Array<T>>::Array: 'a,

Source§

type Output = &'a <N as Array<T>>::Array

Source§

impl<'a, T, N> IsolateIndex<&'a [T; 2]> for StaticRange<N>
where N: Unsigned + Array<T>, <N as Array<T>>::Array: 'a,

Source§

type Output = &'a <N as Array<T>>::Array

Source§

impl<'a, T, N> IsolateIndex<&'a [T; 3]> for StaticRange<N>
where N: Unsigned + Array<T>, <N as Array<T>>::Array: 'a,

Source§

type Output = &'a <N as Array<T>>::Array

Source§

impl<'a, T, N> IsolateIndex<&'a [T; 4]> for StaticRange<N>
where N: Unsigned + Array<T>, <N as Array<T>>::Array: 'a,

Source§

type Output = &'a <N as Array<T>>::Array

Source§

impl<'a, T, N> IsolateIndex<&'a [T; 5]> for StaticRange<N>
where N: Unsigned + Array<T>, <N as Array<T>>::Array: 'a,

Source§

type Output = &'a <N as Array<T>>::Array

Source§

impl<'a, T, N> IsolateIndex<&'a [T; 6]> for StaticRange<N>
where N: Unsigned + Array<T>, <N as Array<T>>::Array: 'a,

Source§

type Output = &'a <N as Array<T>>::Array

Source§

impl<'a, T, N> IsolateIndex<&'a [T; 7]> for StaticRange<N>
where N: Unsigned + Array<T>, <N as Array<T>>::Array: 'a,

Source§

type Output = &'a <N as Array<T>>::Array

Source§

impl<'a, T, N> IsolateIndex<&'a [T; 8]> for StaticRange<N>
where N: Unsigned + Array<T>, <N as Array<T>>::Array: 'a,

Source§

type Output = &'a <N as Array<T>>::Array

Source§

impl<'a, T, N> IsolateIndex<&'a [T; 9]> for StaticRange<N>
where N: Unsigned + Array<T>, <N as Array<T>>::Array: 'a,

Source§

type Output = &'a <N as Array<T>>::Array

Source§

impl<'a, T, N> IsolateIndex<&'a [T; 10]> for StaticRange<N>
where N: Unsigned + Array<T>, <N as Array<T>>::Array: 'a,

Source§

type Output = &'a <N as Array<T>>::Array

Source§

impl<'a, T, N> IsolateIndex<&'a [T; 11]> for StaticRange<N>
where N: Unsigned + Array<T>, <N as Array<T>>::Array: 'a,

Source§

type Output = &'a <N as Array<T>>::Array

Source§

impl<'a, T, N> IsolateIndex<&'a [T; 12]> for StaticRange<N>
where N: Unsigned + Array<T>, <N as Array<T>>::Array: 'a,

Source§

type Output = &'a <N as Array<T>>::Array

Source§

impl<'a, T, N> IsolateIndex<&'a [T; 13]> for StaticRange<N>
where N: Unsigned + Array<T>, <N as Array<T>>::Array: 'a,

Source§

type Output = &'a <N as Array<T>>::Array

Source§

impl<'a, T, N> IsolateIndex<&'a [T; 14]> for StaticRange<N>
where N: Unsigned + Array<T>, <N as Array<T>>::Array: 'a,

Source§

type Output = &'a <N as Array<T>>::Array

Source§

impl<'a, T, N> IsolateIndex<&'a [T; 15]> for StaticRange<N>
where N: Unsigned + Array<T>, <N as Array<T>>::Array: 'a,

Source§

type Output = &'a <N as Array<T>>::Array

Source§

impl<'a, T, N> IsolateIndex<&'a [T; 16]> for StaticRange<N>
where N: Unsigned + Array<T>, <N as Array<T>>::Array: 'a,

Source§

type Output = &'a <N as Array<T>>::Array

Source§

impl<'a, T, N> IsolateIndex<&'a [T]> for StaticRange<N>
where N: Unsigned + Array<T>, <N as Array<T>>::Array: 'a,

Source§

type Output = &'a <N as Array<T>>::Array

Source§

impl<'a, T, N> IsolateIndex<&'a mut [T]> for StaticRange<N>
where N: Unsigned + Array<T>, <N as Array<T>>::Array: 'a,

Source§

type Output = &'a mut <N as Array<T>>::Array

Source§

impl<S, N> IsolateIndex<S> for StaticRange<N>

Source§

impl<S, N, M> IsolateIndex<UniChunked<S, U<M>>> for StaticRange<N>
where S: Set, M: Unsigned, N: Unsigned + Mul<M>, StaticRange<<N as Mul<M>>::Output>: IsolateIndex<S>,

Source§

impl<S, O, N: Unsigned> IsolateIndex<Subset<S, O>> for StaticRange<N>
where Range<usize>: IsolateIndex<Subset<S, O>>,