[][src]Module driver_async::bytes

Byte buffer, packing and unpacking utilities. Provides traits for genericly packing types into different endian byte buffers (ToFromBytesEndian) and for storing bytes/copy-types (Storage)

Structs

StaticBuf

Static byte buffer. StaticBuf<[u8; 16]> can store a [u8] array from 0-16 bytes for example. Unlike other static buffers, this does NOT reallocate if you out grow the internal buffer. If you try to request more bytes than its able to store, it will panic.

Enums

BufError
Endian

Byte Endian

Traits

Storage

Objects that store and own Ts (Box<[T]>, Vec<T>, StaticBuf<[T; 32]>, etc). This allows for generic byte storage types for byte buffers. This also enable generic storage for any T type but the Copy + Default requirement might be too restricting for all cases.

ToFromBytesEndian

Trait for types that can be packed/unpack into/from bytes in either endian.