binius_field::underlier

Trait Divisible

source
pub unsafe trait Divisible<U: UnderlierType>: UnderlierType {
    const WIDTH: usize = _;

    // Required methods
    fn split_ref(&self) -> &[U];
    fn split_mut(&mut self) -> &mut [U];

    // Provided methods
    fn split_slice(values: &[Self]) -> &[U] { ... }
    fn split_slice_mut(values: &mut [Self]) -> &mut [U] { ... }
}
Expand description

Underlier value that can be split into a slice of smaller U values. This trait is unsafe because it allows to reinterpret the memory of a type as a slice of another type.

§Safety

Implementors must ensure that &Self can be safely bit-cast to &[U; Self::WIDTH] and &mut Self can be safely bit-cast to &mut [U; Self::WIDTH].

Provided Associated Constants§

source

const WIDTH: usize = _

Required Methods§

source

fn split_ref(&self) -> &[U]

source

fn split_mut(&mut self) -> &mut [U]

Provided Methods§

source

fn split_slice(values: &[Self]) -> &[U]

source

fn split_slice_mut(values: &mut [Self]) -> &mut [U]

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Divisible<u8> for u16

source§

fn split_ref(&self) -> &[u8]

source§

fn split_mut(&mut self) -> &mut [u8]

source§

impl Divisible<u8> for u32

source§

fn split_ref(&self) -> &[u8]

source§

fn split_mut(&mut self) -> &mut [u8]

source§

impl Divisible<u8> for u64

source§

fn split_ref(&self) -> &[u8]

source§

fn split_mut(&mut self) -> &mut [u8]

source§

impl Divisible<u8> for u128

source§

fn split_ref(&self) -> &[u8]

source§

fn split_mut(&mut self) -> &mut [u8]

source§

impl Divisible<u16> for u32

source§

fn split_ref(&self) -> &[u16]

source§

fn split_mut(&mut self) -> &mut [u16]

source§

impl Divisible<u16> for u64

source§

fn split_ref(&self) -> &[u16]

source§

fn split_mut(&mut self) -> &mut [u16]

source§

impl Divisible<u16> for u128

source§

fn split_ref(&self) -> &[u16]

source§

fn split_mut(&mut self) -> &mut [u16]

source§

impl Divisible<u32> for u64

source§

fn split_ref(&self) -> &[u32]

source§

fn split_mut(&mut self) -> &mut [u32]

source§

impl Divisible<u32> for u128

source§

fn split_ref(&self) -> &[u32]

source§

fn split_mut(&mut self) -> &mut [u32]

source§

impl Divisible<u64> for u128

source§

fn split_ref(&self) -> &[u64]

source§

fn split_mut(&mut self) -> &mut [u64]

Implementors§

source§

impl Divisible<u8> for ScaledUnderlier<u16, 2>

source§

impl Divisible<u8> for ScaledUnderlier<u32, 2>

source§

impl Divisible<u8> for ScaledUnderlier<u64, 2>

source§

impl Divisible<u8> for ScaledUnderlier<u128, 2>

source§

impl Divisible<u8> for ScaledUnderlier<ScaledUnderlier<u16, 2>, 2>

source§

impl Divisible<u8> for ScaledUnderlier<ScaledUnderlier<u32, 2>, 2>

source§

impl Divisible<u8> for ScaledUnderlier<ScaledUnderlier<u64, 2>, 2>

source§

impl Divisible<u8> for ScaledUnderlier<ScaledUnderlier<u128, 2>, 2>

source§

impl Divisible<u8> for ScaledUnderlier<ScaledUnderlier<M128, 2>, 2>

source§

impl Divisible<u8> for ScaledUnderlier<M128, 2>

source§

impl Divisible<u16> for ScaledUnderlier<u32, 2>

source§

impl Divisible<u16> for ScaledUnderlier<u64, 2>

source§

impl Divisible<u16> for ScaledUnderlier<u128, 2>

source§

impl Divisible<u16> for ScaledUnderlier<ScaledUnderlier<u32, 2>, 2>

source§

impl Divisible<u16> for ScaledUnderlier<ScaledUnderlier<u64, 2>, 2>

source§

impl Divisible<u16> for ScaledUnderlier<ScaledUnderlier<u128, 2>, 2>

source§

impl Divisible<u16> for ScaledUnderlier<ScaledUnderlier<M128, 2>, 2>

source§

impl Divisible<u16> for ScaledUnderlier<M128, 2>

source§

impl Divisible<u32> for ScaledUnderlier<u64, 2>

source§

impl Divisible<u32> for ScaledUnderlier<u128, 2>

source§

impl Divisible<u32> for ScaledUnderlier<ScaledUnderlier<u64, 2>, 2>

source§

impl Divisible<u32> for ScaledUnderlier<ScaledUnderlier<u128, 2>, 2>

source§

impl Divisible<u32> for ScaledUnderlier<ScaledUnderlier<M128, 2>, 2>

source§

impl Divisible<u32> for ScaledUnderlier<M128, 2>

source§

impl Divisible<u64> for ScaledUnderlier<u128, 2>

source§

impl Divisible<u64> for ScaledUnderlier<ScaledUnderlier<u128, 2>, 2>

source§

impl Divisible<u64> for ScaledUnderlier<ScaledUnderlier<M128, 2>, 2>

source§

impl Divisible<u64> for ScaledUnderlier<M128, 2>

source§

impl Divisible<u128> for ScaledUnderlier<ScaledUnderlier<M128, 2>, 2>

source§

impl Divisible<u128> for ScaledUnderlier<M128, 2>

source§

impl<U> Divisible<U> for ScaledUnderlier<ScaledUnderlier<U, 2>, 2>
where ScaledUnderlier<ScaledUnderlier<U, 2>, 2>: UnderlierType + NoUninit, U: UnderlierType + Pod,

source§

impl<U, const N: usize> Divisible<U> for ScaledUnderlier<U, N>

source§

impl<U: UnderlierType> Divisible<U> for U