pub unsafe trait Split<T, K: ArrayLength>: GenericSequence<T> {
    type First: GenericSequence<T>;
    type Second: GenericSequence<T>;

    // Required method
    fn split(self) -> (Self::First, Self::Second);
}
Expand description

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

§Safety

While the split method is marked safe, care must be taken when implementing it.

Required Associated Types§

source

type First: GenericSequence<T>

First part of the resulting split array

source

type Second: GenericSequence<T>

Second part of the resulting split array

Required Methods§

source

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

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

Object Safety§

This trait is not object safe.

Implementors§

source§

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

§

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

§

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

source§

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

§

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

§

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

source§

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

§

type First = GenericArray<T, K>

§

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