Trait bitvec::view::BitViewSized

source ·
pub trait BitViewSized: BitView + Sized {
    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§

source

const ZERO: Self

The zero constant.

Required Methods§

source

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

Views the type as a slice of its elements.

source

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

Views the type as a mutable slice of its elements.

Provided Methods§

source

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

Wraps self in a BitArray.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

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

source§

const ZERO: Self = _

source§

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

source§

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

Implementors§

source§

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

source§

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