[][src]Crate rkyv_dyn

Trait object serialization for rkyv.

With rkyv_dyn, trait objects can be serialized with rkyv then the methods can be called without deserializing. All it takes is some macro magic.

See ArchiveDyn for an example of how to use rkyv_dyn.

Features

  • nightly: Enables some nightly features, such as likely.
  • strict: Guarantees that types will have the same representations across platforms and compilations. This is already the case in practice, but this feature provides a guarantee.
  • validation: Enables validation support through bytecheck.
  • vtable_cache: Enables local vtable caching to speed up lookups after the first.

Re-exports

pub use validation::VTableValidation;

Modules

validation

Validation implementations and helper types.

Macros

register_vtable

Registers a new vtable with the trait object system.

Structs

ArchivedDyn

A reference to an archived trait object.

DynResolver

The resolver for an ArchivedDyn.

Traits

ArchiveDyn

A trait object that can be serialized.

TypeNameDyn

An object-safe version of TypeName.

WriteDyn

An object-safe version of Write.

Functions

hash_type

Hashes the given type and returns the result.

hash_value

Hashes the given value and returns the result.

Type Definitions

DynError

A generic error that can be returned from a WriteDyn.

Attribute Macros

archive_dyn

Creates archiveable trait objects and registers implementations.