Trait ToBitfield

Source
pub trait ToBitfield<S>: Sized {
    // Required methods
    fn to_bitfield(self) -> S;
    fn one() -> Self;
    fn zero() -> Self;
}

Required Methods§

Source

fn to_bitfield(self) -> S

Source

fn one() -> Self

Source

fn zero() -> 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<S: NumCast + One + Zero + ToPrimitive + FromPrimitive> ToBitfield<S> for i8

Source§

fn to_bitfield(self) -> S

Source§

fn one() -> Self

Source§

fn zero() -> Self

Source§

impl<S: NumCast + One + Zero + ToPrimitive + FromPrimitive> ToBitfield<S> for i16

Source§

fn to_bitfield(self) -> S

Source§

fn one() -> Self

Source§

fn zero() -> Self

Source§

impl<S: NumCast + One + Zero + ToPrimitive + FromPrimitive> ToBitfield<S> for i32

Source§

fn to_bitfield(self) -> S

Source§

fn one() -> Self

Source§

fn zero() -> Self

Source§

impl<S: NumCast + One + Zero + ToPrimitive + FromPrimitive> ToBitfield<S> for i64

Source§

fn to_bitfield(self) -> S

Source§

fn one() -> Self

Source§

fn zero() -> Self

Source§

impl<S: NumCast + One + Zero + ToPrimitive + FromPrimitive> ToBitfield<S> for isize

Source§

fn to_bitfield(self) -> S

Source§

fn one() -> Self

Source§

fn zero() -> Self

Source§

impl<S: NumCast + One + Zero + ToPrimitive + FromPrimitive> ToBitfield<S> for u8

Source§

fn to_bitfield(self) -> S

Source§

fn one() -> Self

Source§

fn zero() -> Self

Source§

impl<S: NumCast + One + Zero + ToPrimitive + FromPrimitive> ToBitfield<S> for u16

Source§

fn to_bitfield(self) -> S

Source§

fn one() -> Self

Source§

fn zero() -> Self

Source§

impl<S: NumCast + One + Zero + ToPrimitive + FromPrimitive> ToBitfield<S> for u32

Source§

fn to_bitfield(self) -> S

Source§

fn one() -> Self

Source§

fn zero() -> Self

Source§

impl<S: NumCast + One + Zero + ToPrimitive + FromPrimitive> ToBitfield<S> for u64

Source§

fn to_bitfield(self) -> S

Source§

fn one() -> Self

Source§

fn zero() -> Self

Source§

impl<S: NumCast + One + Zero + ToPrimitive + FromPrimitive> ToBitfield<S> for usize

Source§

fn to_bitfield(self) -> S

Source§

fn one() -> Self

Source§

fn zero() -> Self

Source§

impl<S: One + Zero> ToBitfield<S> for bool

Source§

fn to_bitfield(self) -> S

Source§

fn one() -> Self

Source§

fn zero() -> Self

Implementors§