Crate rkyv_dyn[−][src]
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 aslikely
.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 throughbytecheck
.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 |
Traits
DeserializeDyn | A trait object that can be deserialized. |
DynDeserializer | An object-safe version of |
DynSerializer | An object-safe version of |
SerializeDyn | A trait object that can be archived. |
Type Definitions
DynError | An error that can occur while serializing and deserializing trait objects. |
Attribute Macros
archive_dyn | Creates archivable trait objects and registers implementations. |