Expand description
§Overview
This crate aims to fill the gap in Rust’s dynamic traits system by exposing the control over dynamic
virtual function tables to the user in a safe API. Below is a list of capabilities unlocked by
dync
.
- Create homogeneous untyped
Vec
s that store a single virtual function table for all contained elements. This functionality is enabled by thetraits
feature. For more details seevec_dyn
.
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 anVecCopy
mapping valid numeric data types by corresponding generic parameters. For example, passing anVecCopy
containing data of typeu8
will cause this macro to call$fn
with type parameteru8
like$fn::<u8>(buffer)
. - eval_
align - from_
dyn - Convert a given container with a dynamic vtable to a concrete type.
- into_
dyn - Convert a given container type (e.g.
VecCopy
orSliceDyn
) to have a dynamic VTable.
Structs§
- Copy
Value Mut - A generic mutable
Copy
value reference. - Copy
Value Ref - A generic value reference to a
Copy
type. - Meta
- Defines a meta struct containing information about a type but not the type itself.
- Slice
- Slice
Copy - Slice
Copy Mut - Slice
Mut - Value
- Value
Mut - A generic mutable value reference into a buffer.
- Value
Ref - A generic value reference into a buffer.
- VecCopy
- Buffer of untyped
Copy
values. - VecDyn
Enums§
Traits§
- Copy
Elem - Drop
AsAligned - Elem
- GetBytes
Mut - GetBytes
Ref - VTable
VTable
defines a type that represents a virtual function table for some typeT
.