[][src]Crate dync

This crate defines a buffer data structure optimized to be written to and read from standard Vecs.

VecCopy is particularly useful when dealing with plain data whose type is determined at run time. Note that data is stored in the underlying byte buffers in native endian form, thus requesting typed data from a buffer on a platform with different endianness is unsafe.

Caveats

VecCopy doesn't support zero-sized types.

Modules

macros

Utility macros for code generation.

Macros

call_numeric_buffer_fn

Applies $fn to an VecCopy mapping valid numeric data types by corresponding generic parameters. For example, passing an VecCopy containing data of type u8 will cause this macro to call $fn with type parameter u8 like $fn::<u8>(buffer).

Structs

CopyValueMut

A generic mutable Copy value reference.

CopyValueRef

A generic value reference to a Copy type.

Value
ValueMut

A generic mutable value reference into a buffer.

ValueRef

A generic value reference into a buffer.

VecCopy

Buffer of plain old data. The data is stored as an array of bytes (Vec<u8>).

VecDyn

This container is a WIP, not to be used in production.

Enums

Error

Traits

Elem
GetBytes
GetBytesMut
GetBytesRef
HasClone
HasDebug
HasEq
HasHash
HasPartialEq
VTable

VTable defines a type that represents a virtual function table for some type T.

Type Definitions

BoxValue