[][src]Macro rkyv_dyn::register_vtable

macro_rules! register_vtable {
    ($type:ty as $trait:ty) => { ... };
}

Registers a new vtable with the trait object system.

This is called by #[archive_dyn] when attached to trait impls, but can be called manually to register impls instead. You might need to do this if you're using generic traits and types, since each specific instance needs to be individually registered.

Call it like register_vtable!(MyType as dyn MyTrait).