Trait PackInt

Source
pub trait PackInt {
    // Required methods
    fn size() -> usize;
    fn pack_int_to(&self, buffer: &mut [i32]);
}
Expand description

Something that could be packed to i32 buffers

Required Methods§

Source

fn size() -> usize

Size of integer part of an object.

Source

fn pack_int_to(&self, buffer: &mut [i32])

Write an object into i32 buffer.

Buffer must be of size greater or equal to object’s one.

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 PackInt for i32

Source§

fn size() -> usize

Source§

fn pack_int_to(&self, buffer: &mut [i32])

Source§

impl PackInt for u32

Source§

fn size() -> usize

Source§

fn pack_int_to(&self, buffer: &mut [i32])

Implementors§