Skip to main content

BinaryInt

Trait BinaryInt 

Source
pub trait BinaryInt:
    Copy
    + AddAssign<Self>
    + Eq
    + Debug {
    // Required methods
    fn zero() -> Self;
    fn bits(self) -> Bits<Self> ;
    fn test(self, shift: u32) -> bool;
    fn push(&mut self, bit: bool);
    fn pop(&mut self);
}

Required Methods§

Source

fn zero() -> Self

Source

fn bits(self) -> Bits<Self>

Source

fn test(self, shift: u32) -> bool

Source

fn push(&mut self, bit: bool)

Source

fn pop(&mut 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 BinaryInt for u8

Source§

fn zero() -> Self

Source§

fn bits(self) -> Bits<Self>

Source§

fn test(self, shift: u32) -> bool

Source§

fn push(&mut self, bit: bool)

Source§

fn pop(&mut self)

Source§

impl BinaryInt for u16

Source§

fn zero() -> Self

Source§

fn bits(self) -> Bits<Self>

Source§

fn test(self, shift: u32) -> bool

Source§

fn push(&mut self, bit: bool)

Source§

fn pop(&mut self)

Source§

impl BinaryInt for u32

Source§

fn zero() -> Self

Source§

fn bits(self) -> Bits<Self>

Source§

fn test(self, shift: u32) -> bool

Source§

fn push(&mut self, bit: bool)

Source§

fn pop(&mut self)

Source§

impl BinaryInt for u64

Source§

fn zero() -> Self

Source§

fn bits(self) -> Bits<Self>

Source§

fn test(self, shift: u32) -> bool

Source§

fn push(&mut self, bit: bool)

Source§

fn pop(&mut self)

Source§

impl BinaryInt for u128

Source§

fn zero() -> Self

Source§

fn bits(self) -> Bits<Self>

Source§

fn test(self, shift: u32) -> bool

Source§

fn push(&mut self, bit: bool)

Source§

fn pop(&mut self)

Source§

impl BinaryInt for usize

Source§

fn zero() -> Self

Source§

fn bits(self) -> Bits<Self>

Source§

fn test(self, shift: u32) -> bool

Source§

fn push(&mut self, bit: bool)

Source§

fn pop(&mut self)

Implementors§