reth::primitives::revm_primitives::bitvec::view

Trait BitViewSized

pub trait BitViewSized: Sized + BitView {
    const ZERO: Self;

    // Required methods
    fn as_raw_slice(&self) -> &[Self::Store];
    fn as_raw_mut_slice(&mut self) -> &mut [Self::Store];

    // Provided method
    fn into_bitarray<O>(self) -> BitArray<Self, O>
       where O: BitOrder { ... }
}
Expand description

Helper trait for scalars and arrays, but not slices.

Required Associated Constants§

const ZERO: Self

The zero constant.

Required Methods§

fn as_raw_slice(&self) -> &[Self::Store]

Views the type as a slice of its elements.

fn as_raw_mut_slice(&mut self) -> &mut [Self::Store]

Views the type as a mutable slice of its elements.

Provided Methods§

fn into_bitarray<O>(self) -> BitArray<Self, O>
where O: BitOrder,

Wraps self in a BitArray.

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§

§

impl<T, const N: usize> BitViewSized for [T; N]
where T: BitStore,

§

const ZERO: [T; N] = _

§

fn as_raw_slice(&self) -> &[<[T; N] as BitView>::Store]

§

fn as_raw_mut_slice(&mut self) -> &mut [<[T; N] as BitView>::Store]

Implementors§

§

impl<T> BitViewSized for T
where T: BitStore,

§

const ZERO: T = <T as BitStore>::ZERO