[go: up one dir, main page]

Crate rkyv_dyn

Crate rkyv_dyn 

Source
Expand description

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 SerializeDyn 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. This requires mutating the archive, which is not possible for all use cases.

Re-exports§

pub use validation::CheckDynError;
pub use validation::DynContext;

Modules§

validation
Validation implementations and helper types.

Macros§

register_impl
Registers a new impl with the trait object system.

Structs§

ArchivedDynMetadata
The archived version of DynMetadata.

Traits§

DeserializeDyn
A trait object that can be deserialized.
DynDeserializer
An object-safe version of Deserializer.
DynSerializer
An object-safe version of Serializer.
SerializeDyn
A trait object that can be archived.

Type Aliases§

DynError
An error that can occur while serializing and deserializing trait objects.

Attribute Macros§

archive_dyn
Creates archivable trait objects and registers implementations.