binius_field::as_packed_field

Trait PackScalar

source
pub trait PackScalar<F: Field>: UnderlierType {
    type Packed: PackedField<Scalar = F> + WithUnderlier<Underlier = Self>;
}
Expand description

This trait represents correspondence (UnderlierType, Field) -> PackedField. For example (u64, BinaryField16b) -> PackedBinaryField4x16b.

Required Associated Types§

source

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

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<F> PackScalar<F> for u8
where F: BinaryField, PackedPrimitiveType<u8, F>: PackedField<Scalar = F> + WithUnderlier<Underlier = u8>,

source§

type Packed = PackedPrimitiveType<u8, F>

source§

impl<F> PackScalar<F> for u16
where F: BinaryField, PackedPrimitiveType<u16, F>: PackedField<Scalar = F> + WithUnderlier<Underlier = u16>,

source§

type Packed = PackedPrimitiveType<u16, F>

source§

impl<F> PackScalar<F> for u32
where F: BinaryField, PackedPrimitiveType<u32, F>: PackedField<Scalar = F> + WithUnderlier<Underlier = u32>,

source§

type Packed = PackedPrimitiveType<u32, F>

source§

impl<F> PackScalar<F> for u64
where F: BinaryField, PackedPrimitiveType<u64, F>: PackedField<Scalar = F> + WithUnderlier<Underlier = u64>,

source§

type Packed = PackedPrimitiveType<u64, F>

source§

impl<F> PackScalar<F> for u128
where F: BinaryField, PackedPrimitiveType<u128, F>: PackedField<Scalar = F> + WithUnderlier<Underlier = u128>,

source§

type Packed = PackedPrimitiveType<u128, F>

Implementors§

source§

impl<F> PackScalar<F> for U1
where F: BinaryField, PackedPrimitiveType<U1, F>: PackedField<Scalar = F> + WithUnderlier<Underlier = U1>,

source§

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

source§

impl<F> PackScalar<F> for U2
where F: BinaryField, PackedPrimitiveType<U2, F>: PackedField<Scalar = F> + WithUnderlier<Underlier = U2>,

source§

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

source§

impl<F> PackScalar<F> for U4
where F: BinaryField, PackedPrimitiveType<U4, F>: PackedField<Scalar = F> + WithUnderlier<Underlier = U4>,

source§

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

source§

impl<U, F, const N: usize> PackScalar<F> for ScaledUnderlier<U, N>
where U: PackScalar<F> + UnderlierType + Pod, F: Field, ScaledPackedField<U::Packed, N>: PackedField<Scalar = F> + WithUnderlier<Underlier = ScaledUnderlier<U, N>>,

source§

type Packed = ScaledPackedField<<U as PackScalar<F>>::Packed, N>