pub trait DynamicSerializer: DynamicSerializerInner { }
Expand description
A marker trait that is used as an attestation of dynamic serialization capabilities.
Use DynSerializer
to create instances of dynamic serializers.
§Discussion
If serializers are passed deep down the call stack, causing local instantiation of multiple functions, it might be beneficial to consider using a dynamically dispatched serializer instead. The hit taken during code generation (and compilation times) might not be worth it, depending on the task at hand. As an example, slow-path protocols might not derive much benefit from deep compiler optimization which tips the scales in favor of using a dynamically dispatched serializer instead.