Skip to main content

Split

pub unsafe trait Split<T, K>: GenericSequence<T>
where K: ArrayLength<T>,
{ type First: GenericSequence<T>; type Second: GenericSequence<T>; // Required method fn split(self) -> (Self::First, Self::Second); }
👎Deprecated: please upgrade to generic-array 1.x
Expand description

Defines a GenericSequence that can be split into two parts at a given pivot index.

Required Associated Types§

type First: GenericSequence<T>

👎Deprecated: please upgrade to generic-array 1.x

First part of the resulting split array

type Second: GenericSequence<T>

👎Deprecated: please upgrade to generic-array 1.x

Second part of the resulting split array

Required Methods§

fn split(self) -> (Self::First, Self::Second)

👎Deprecated: please upgrade to generic-array 1.x

Splits an array at the given index, returning the separate parts of the array.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

§

impl<'a, T, N, K> Split<T, K> for &'a GenericArray<T, N>
where N: ArrayLength<T> + Sub<K>, K: ArrayLength<T> + 'static, <N as Sub<K>>::Output: ArrayLength<T>,

§

type First = &'a GenericArray<T, K>

§

type Second = &'a GenericArray<T, <N as Sub<K>>::Output>

§

impl<'a, T, N, K> Split<T, K> for &'a mut GenericArray<T, N>
where N: ArrayLength<T> + Sub<K>, K: ArrayLength<T> + 'static, <N as Sub<K>>::Output: ArrayLength<T>,

§

type First = &'a mut GenericArray<T, K>

§

type Second = &'a mut GenericArray<T, <N as Sub<K>>::Output>

§

impl<T, N, K> Split<T, K> for GenericArray<T, N>
where N: ArrayLength<T> + Sub<K>, K: ArrayLength<T>, <N as Sub<K>>::Output: ArrayLength<T>,

§

type First = GenericArray<T, K>

§

type Second = GenericArray<T, <N as Sub<K>>::Output>