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>

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<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>