generic_array::sequence

Trait Concat

Source
pub unsafe trait Concat<T, M: ArrayLength>: GenericSequence<T> {
    type Rest: GenericSequence<T, Length = M>;
    type Output: GenericSequence<T>;

    // Required method
    fn concat(self, rest: Self::Rest) -> Self::Output;
}
Expand description

Defines GenericSequences which can be joined together, forming a larger array.

§Safety

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

Required Associated Types§

Source

type Rest: GenericSequence<T, Length = M>

Sequence to be concatenated with self

Source

type Output: GenericSequence<T>

Resulting sequence formed by the concatenation.

Required Methods§

Source

fn concat(self, rest: Self::Rest) -> Self::Output

Concatenate, or join, two sequences.

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§

Source§

impl<T, N, M> Concat<T, M> for GenericArray<T, N>
where N: ArrayLength + Add<M>, M: ArrayLength, Sum<N, M>: ArrayLength,