binius_field::as_packed_field

Trait AsSinglePacked

source
pub trait AsSinglePacked: Field {
    type Packed: PackedField<Scalar = Self> + WithUnderlier<Underlier: From<Self::Underlier> + Into<Self::Underlier>>;

    // Provided methods
    fn to_single_packed(self) -> Self::Packed { ... }
    fn from_single_packed(value: Self::Packed) -> Self { ... }
}
Expand description

Trait that establishes correspondence between the scalar field and a packed field of the same bit size with a single element.

E.g. BinaryField64b -> PackedBinaryField1x64b. Note that the underlier of the packed field may be different. E.g. BinaryField128b has u128 as underlier, while for x64 PackedBinaryField1x128b’s underlier may be M128.

Required Associated Types§

source

type Packed: PackedField<Scalar = Self> + WithUnderlier<Underlier: From<Self::Underlier> + Into<Self::Underlier>>

Provided Methods§

source

fn to_single_packed(self) -> Self::Packed

source

fn from_single_packed(value: Self::Packed) -> Self

Object Safety§

This trait is not object safe.

Implementors§

source§

impl AsSinglePacked for AESTowerField8b

source§

type Packed = PackedPrimitiveType<u8, AESTowerField8b>

source§

impl AsSinglePacked for AESTowerField16b

source§

type Packed = PackedPrimitiveType<u16, AESTowerField16b>

source§

impl AsSinglePacked for AESTowerField32b

source§

type Packed = PackedPrimitiveType<u32, AESTowerField32b>

source§

impl AsSinglePacked for AESTowerField64b

source§

type Packed = PackedPrimitiveType<u64, AESTowerField64b>

source§

impl AsSinglePacked for AESTowerField128b

source§

type Packed = PackedPrimitiveType<M128, AESTowerField128b>

source§

impl AsSinglePacked for BinaryField1b

source§

type Packed = PackedPrimitiveType<SmallU<1>, BinaryField1b>

source§

impl AsSinglePacked for BinaryField2b

source§

type Packed = PackedPrimitiveType<SmallU<2>, BinaryField2b>

source§

impl AsSinglePacked for BinaryField4b

source§

type Packed = PackedPrimitiveType<SmallU<4>, BinaryField4b>

source§

impl AsSinglePacked for BinaryField8b

source§

type Packed = PackedPrimitiveType<u8, BinaryField8b>

source§

impl AsSinglePacked for BinaryField16b

source§

type Packed = PackedPrimitiveType<u16, BinaryField16b>

source§

impl AsSinglePacked for BinaryField32b

source§

type Packed = PackedPrimitiveType<u32, BinaryField32b>

source§

impl AsSinglePacked for BinaryField64b

source§

type Packed = PackedPrimitiveType<u64, BinaryField64b>

source§

impl AsSinglePacked for BinaryField128b

source§

type Packed = PackedPrimitiveType<M128, BinaryField128b>

source§

impl AsSinglePacked for BinaryField128bPolyval

source§

type Packed = PackedPrimitiveType<M128, BinaryField128bPolyval>