Skip to main content

SplitJoin

Trait SplitJoin 

Source
pub trait SplitJoin {
    type Halved;

    // Required methods
    fn split(self) -> LoHi<Self::Halved>;
    fn join(halves: LoHi<Self::Halved>) -> Self;
}
Expand description

Split a type into or join from two halves.

For example, even dimensional fixed size arrays of length N will be split so the first N / 2 elements are in the low half, and the last N / 2 elements are in the high half.

Required Associated Types§

Source

type Halved

The type of the halved element.

Required Methods§

Source

fn split(self) -> LoHi<Self::Halved>

Split self into two equal halves.

Source

fn join(halves: LoHi<Self::Halved>) -> Self

Create self by joining the two halves.

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.

Implementations on Foreign Types§

Source§

impl<T: Copy> SplitJoin for [T; 2]

Source§

type Halved = [T; 1]

Source§

fn split(self) -> LoHi<Self::Halved>

Source§

fn join(lohi: LoHi<Self::Halved>) -> Self

Source§

impl<T: Copy> SplitJoin for [T; 4]

Source§

type Halved = [T; 2]

Source§

fn split(self) -> LoHi<Self::Halved>

Source§

fn join(lohi: LoHi<Self::Halved>) -> Self

Source§

impl<T: Copy> SplitJoin for [T; 8]

Source§

type Halved = [T; 4]

Source§

fn split(self) -> LoHi<Self::Halved>

Source§

fn join(lohi: LoHi<Self::Halved>) -> Self

Source§

impl<T: Copy> SplitJoin for [T; 16]

Source§

type Halved = [T; 8]

Source§

fn split(self) -> LoHi<Self::Halved>

Source§

fn join(lohi: LoHi<Self::Halved>) -> Self

Source§

impl<T: Copy> SplitJoin for [T; 32]

Source§

type Halved = [T; 16]

Source§

fn split(self) -> LoHi<Self::Halved>

Source§

fn join(lohi: LoHi<Self::Halved>) -> Self

Source§

impl<T: Copy> SplitJoin for [T; 64]

Source§

type Halved = [T; 32]

Source§

fn split(self) -> LoHi<Self::Halved>

Source§

fn join(lohi: LoHi<Self::Halved>) -> Self

Implementors§

Source§

impl SplitJoin for f16x8

Source§

impl SplitJoin for f32x4

Source§

impl SplitJoin for i8x16

Source§

impl SplitJoin for u8x16

Source§

impl<A> SplitJoin for Emulated<f32, 8, A>
where A: Copy,

Source§

impl<A> SplitJoin for Emulated<f32, 16, A>
where A: Copy,

Source§

impl<A> SplitJoin for Emulated<i8, 32, A>
where A: Copy,

Source§

type Halved = Emulated<i8, 16, A>

Source§

impl<A> SplitJoin for Emulated<i8, 64, A>
where A: Copy,

Source§

type Halved = Emulated<i8, 32, A>

Source§

impl<A> SplitJoin for Emulated<i16, 16, A>
where A: Copy,

Source§

impl<A> SplitJoin for Emulated<i16, 32, A>
where A: Copy,

Source§

type Halved = Emulated<i16, 16, A>

Source§

impl<A> SplitJoin for Emulated<i32, 8, A>
where A: Copy,

Source§

impl<A> SplitJoin for Emulated<i32, 16, A>
where A: Copy,

Source§

impl<A> SplitJoin for Emulated<u8, 32, A>
where A: Copy,

Source§

type Halved = Emulated<u8, 16, A>

Source§

impl<A> SplitJoin for Emulated<u8, 64, A>
where A: Copy,

Source§

type Halved = Emulated<u8, 32, A>

Source§

impl<A> SplitJoin for Emulated<u32, 8, A>
where A: Copy,

Source§

impl<A> SplitJoin for Emulated<u32, 16, A>
where A: Copy,

Source§

impl<A> SplitJoin for Emulated<u64, 4, A>
where A: Copy,

Source§

impl<A> SplitJoin for Emulated<f16, 16, A>
where A: Copy,

Source§

impl<A: Sealed> SplitJoin for BitMask<2, A>

Source§

type Halved = BitMask<1, A>

Source§

impl<A: Sealed> SplitJoin for BitMask<4, A>

Source§

type Halved = BitMask<2, A>

Source§

impl<A: Sealed> SplitJoin for BitMask<8, A>

Source§

type Halved = BitMask<4, A>

Source§

impl<A: Sealed> SplitJoin for BitMask<16, A>

Source§

type Halved = BitMask<8, A>

Source§

impl<A: Sealed> SplitJoin for BitMask<32, A>

Source§

type Halved = BitMask<16, A>

Source§

impl<A: Sealed> SplitJoin for BitMask<64, A>

Source§

type Halved = BitMask<32, A>