Trait StaticallySized

Source
pub trait StaticallySized {
    const SIZE: usize;
}
Expand description

A trait indicating, that a type only has one fixed size.

Required Associated Constants§

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 StaticallySized for i8

Source§

const SIZE: usize = 1usize

Source§

impl StaticallySized for i16

Source§

const SIZE: usize = 2usize

Source§

impl StaticallySized for i32

Source§

const SIZE: usize = 4usize

Source§

impl StaticallySized for i64

Source§

const SIZE: usize = 8usize

Source§

impl StaticallySized for i128

Source§

const SIZE: usize = 16usize

Source§

impl StaticallySized for u8

Source§

const SIZE: usize = 1usize

Source§

impl StaticallySized for u16

Source§

const SIZE: usize = 2usize

Source§

impl StaticallySized for u32

Source§

const SIZE: usize = 4usize

Source§

impl StaticallySized for u64

Source§

const SIZE: usize = 8usize

Source§

impl StaticallySized for u128

Source§

const SIZE: usize = 16usize

Implementors§