Struct slice_utils::Chain
source · pub struct Chain<T, A, B>(pub A, pub B, _);Expand description
Two slices joined via Slice::chain.
Tuple Fields§
§0: A§1: BImplementations§
Trait Implementations§
source§impl<'a, T, A, B> IntoIterator for &'a Chain<T, A, B>
impl<'a, T, A, B> IntoIterator for &'a Chain<T, A, B>
source§impl<'a, T, A, B> PartialEq<&'a [T]> for Chain<T, A, B>
impl<'a, T, A, B> PartialEq<&'a [T]> for Chain<T, A, B>
source§impl<T, A, B, const N: usize> PartialEq<[T; N]> for Chain<T, A, B>
impl<T, A, B, const N: usize> PartialEq<[T; N]> for Chain<T, A, B>
source§impl<T: PartialEq, A: PartialEq, B: PartialEq> PartialEq for Chain<T, A, B>
impl<T: PartialEq, A: PartialEq, B: PartialEq> PartialEq for Chain<T, A, B>
source§impl<T, A, B> Slice<T> for Chain<T, A, B>
impl<T, A, B> Slice<T> for Chain<T, A, B>
source§fn slice<R: RangeBounds<usize>>(self, range: R) -> Option<SliceOf<T, Self>>
fn slice<R: RangeBounds<usize>>(self, range: R) -> Option<SliceOf<T, Self>>
Takes a sub-slice, returning
None if the range is out-of-bounds. Read moresource§fn chain<O: Slice<T>>(self, other: O) -> Chain<T, Self, O>
fn chain<O: Slice<T>>(self, other: O) -> Chain<T, Self, O>
Chains two slices together, back-to-back: the equivalent of
Iterator::chain. Read moresource§fn chunks(&self, size: usize) -> Chunks<'_, T, Self> ⓘ
fn chunks(&self, size: usize) -> Chunks<'_, T, Self> ⓘ
Returns an iterator over fixed-size chunks: the equivalent of
slice::chunks. The last chunk may be smaller than the rest. Read moresource§fn chunks_exact(&self, size: usize) -> Option<Chunks<'_, T, Self>>
fn chunks_exact(&self, size: usize) -> Option<Chunks<'_, T, Self>>
Returns an iterator over fixed-size chunks. If
data.len() is not
divisible by size, returns None. Otherwise, equivalent to [chunks]. Read moresource§fn cycle(self) -> Cycle<T, Self>
fn cycle(self) -> Cycle<T, Self>
Repeats the slice forever: the equivalent of
Iterator::cycle. Read moresource§fn interleave<O: Slice<T>>(self, other: O) -> Interleave<T, Self, O>
fn interleave<O: Slice<T>>(self, other: O) -> Interleave<T, Self, O>
Interleaves two slices, e.g. [A, B, A, B, …]. Read more
source§fn reverse(self) -> Reverse<T, Self>
fn reverse(self) -> Reverse<T, Self>
Reverses the slice: the equivalent of
Iterator::rev. Read moresource§impl<T, A, B> SliceMut<T> for Chain<T, A, B>
impl<T, A, B> SliceMut<T> for Chain<T, A, B>
source§fn slice_mut<R: RangeBounds<usize>>(
self,
range: R
) -> Option<SliceOfMut<T, Self>>
fn slice_mut<R: RangeBounds<usize>>( self, range: R ) -> Option<SliceOfMut<T, Self>>
Takes a mutable sub-slice, returning
None if the range is out-of-bounds. Read moreimpl<T: Copy, A: Copy, B: Copy> Copy for Chain<T, A, B>
impl<T: Eq, A: Eq, B: Eq> Eq for Chain<T, A, B>
impl<T, A, B> StructuralPartialEq for Chain<T, A, B>
Auto Trait Implementations§
impl<T, A, B> Freeze for Chain<T, A, B>
impl<T, A, B> RefUnwindSafe for Chain<T, A, B>where
A: RefUnwindSafe,
B: RefUnwindSafe,
impl<T, A, B> Send for Chain<T, A, B>
impl<T, A, B> Sync for Chain<T, A, B>
impl<T, A, B> Unpin for Chain<T, A, B>
impl<T, A, B> UnwindSafe for Chain<T, A, B>where
A: UnwindSafe,
B: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more