Skip to main content

PackedSizeOf

Trait PackedSizeOf 

Source
pub trait PackedSizeOf {
    const SIZE_OF: usize;
}
Expand description

Simplified version of the Pack trait which only gives the size of the packed struct. Useful when a function doesn’t need a type to implement all of Pack, but a size is still needed.

Required Associated Constants§

Source

const SIZE_OF: usize

The packed size of the struct

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§