Trait ByteStructLen

Source
pub trait ByteStructLen {
    const BYTE_LEN: usize;
}
Expand description

A type that can be packed into or unpacked from fixed-size bytes, but the method is unknown yet.

Required Associated Constants§

Source

const BYTE_LEN: usize

The length of the packed bytes of this type

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 ByteStructLen for f32

Source§

const BYTE_LEN: usize = 4usize

Source§

impl ByteStructLen for f64

Source§

const BYTE_LEN: usize = 8usize

Source§

impl ByteStructLen for i8

Source§

const BYTE_LEN: usize = 1usize

Source§

impl ByteStructLen for i16

Source§

const BYTE_LEN: usize = 2usize

Source§

impl ByteStructLen for i32

Source§

const BYTE_LEN: usize = 4usize

Source§

impl ByteStructLen for i64

Source§

const BYTE_LEN: usize = 8usize

Source§

impl ByteStructLen for i128

Source§

const BYTE_LEN: usize = 16usize

Source§

impl ByteStructLen for u8

Source§

const BYTE_LEN: usize = 1usize

Source§

impl ByteStructLen for u16

Source§

const BYTE_LEN: usize = 2usize

Source§

impl ByteStructLen for u32

Source§

const BYTE_LEN: usize = 4usize

Source§

impl ByteStructLen for u64

Source§

const BYTE_LEN: usize = 8usize

Source§

impl ByteStructLen for u128

Source§

const BYTE_LEN: usize = 16usize

Source§

impl<T: ByteStructLen, const N: usize> ByteStructLen for [T; N]

Implementors§