Skip to main content

Unit

Trait Unit 

Source
pub unsafe trait Unit:
    Copy
    + Send
    + Sync
    + 'static { }
Expand description

A type through which walks move items: an unsigned integer, or an array of two, with the size and alignment of the item types that use it.

§Safety

Every bit pattern of the type’s size is a value of it, so the bytes of any item read as a unit give a valid unit.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl Unit for [u32; 2]

Source§

impl Unit for [u64; 2]

Source§

impl Unit for u8

Source§

impl Unit for u16

Source§

impl Unit for u32

Source§

impl Unit for u64

Implementors§