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
Vecs that store a single virtual function table for all contained elements. This functionality is enabled by thetraitsfeature. For more details seevec_dyn.
Re-exports
pub use downcast_rs as downcast;pub use index_slice::*;
Modules
- Utility macros for code generation.
- This module defines the function pointers for supported traits from the standard library.
Macros
- Applies
$fnto anVecCopymapping valid numeric data types by corresponding generic parameters. For example, passing anVecCopycontaining data of typeu8will cause this macro to call$fnwith type parameteru8like$fn::<u8>(buffer). - Convert a given container with a dynamic vtable to a concrete type.
- Convert a given container type (e.g.
VecCopyorSliceDyn) to have a dynamic VTable.
Structs
- A generic mutable
Copyvalue reference. - A generic value reference to a
Copytype. - Defines a meta struct containing information about a type but not the type itself.
- A generic mutable value reference into a buffer.
- A generic value reference into a buffer.
- Buffer of untyped
Copyvalues.
Enums
- A VTable reference type.
Traits
VTabledefines a type that represents a virtual function table for some typeT.