[][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.

Re-exports

pub use downcast_rs as downcast;
pub use index_slice::*;

Modules

index_slice
macros

Utility macros for code generation.

traits

This module defines the function pointers for supported traits from the standard library.

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).

from_dyn

Convert a given container with a dynamic vtable to a concrete type.

into_dyn

Convert a given container type (e.g. VecCopy or SliceDyn) to have a dynamic VTable.

Structs

CopyValueMut

A generic mutable Copy value reference.

CopyValueRef

A generic value reference to a Copy type.

Meta

Defines a meta struct containing information about a type but not the type itself.

SliceCopy
SliceCopyMut
SliceDrop
SliceDropMut
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<MaybeUninit<u8>>).

VecDrop

Enums

Error
VTableRef

A VTable reference type.

Traits

CopyElem
Elem
GetBytesMut
GetBytesRef
VTable

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

Type Definitions

BoxValue
SmallValue

Attribute Macros

dync_mod
dync_trait