Split in generic_array::sequence - Rust

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.

Source

First part of the resulting split array

Source

Second part of the resulting split array

Source

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

This trait is not dyn compatible.

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