Trait CodeInt

Source
pub trait CodeInt:
    PrimInt
    + FromPrimitive
    + ToPrimitive
    + Popcnt
    + Default {
    // Required methods
    fn dimensions() -> usize;
    fn serialize_into<W: Write>(&self, writer: W) -> Result<()>;
    fn deserialize_from<R: Read>(reader: R) -> Result<Self>;
}
Expand description

Generic trait of binary codes.

Required Methods§

Source

fn dimensions() -> usize

Source

fn serialize_into<W: Write>(&self, writer: W) -> Result<()>

Source

fn deserialize_from<R: Read>(reader: R) -> Result<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 CodeInt for u8

Source§

fn dimensions() -> usize

Source§

fn serialize_into<W: Write>(&self, writer: W) -> Result<()>

Source§

fn deserialize_from<R: Read>(reader: R) -> Result<Self>

Source§

impl CodeInt for u16

Source§

fn dimensions() -> usize

Source§

fn serialize_into<W: Write>(&self, writer: W) -> Result<()>

Source§

fn deserialize_from<R: Read>(reader: R) -> Result<Self>

Source§

impl CodeInt for u32

Source§

fn dimensions() -> usize

Source§

fn serialize_into<W: Write>(&self, writer: W) -> Result<()>

Source§

fn deserialize_from<R: Read>(reader: R) -> Result<Self>

Source§

impl CodeInt for u64

Source§

fn dimensions() -> usize

Source§

fn serialize_into<W: Write>(&self, writer: W) -> Result<()>

Source§

fn deserialize_from<R: Read>(reader: R) -> Result<Self>

Implementors§