[packet] Introduce context type parameter to Serializer Introduces: * a new `SerializationContext` trait * a concrete no-op implementation of the trait * a context parameter on `Serializer` * a context argument on every serialization method on `Serializer` * `SerializerExt`, split from `Serializer` to defer parameter resolution and then updates all the downstream code so that it builds. Note: this CL does not introduce any logic changes; serialization methods are always called with `NoOpSerializationContext`, and `Serializer` implementations do nothing with the context save for passing it down to wrapped serializers where applicable. Netstack3 also gains a new `NetworkSerializer` trait that's intended to abstract away the concrete serialization context type used by NS3. A future CL will add `NetworkSerializationContext` and switch the trait over. Bug: 485599557 Change-Id: I2d8acf1713fb6766985e0b3db95b69fb6a6a6964 Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1600008 Reviewed-by: Antonio Linhart <antoniolinhart@google.com> Reviewed-by: Andrew Davies <awdavies@google.com> Reviewed-by: Jeff Martin <martinjeffrey@google.com> Reviewed-by: Justin Mattson <jmatt@google.com> Reviewed-by: Zeling Feng <zeling@google.com> Fuchsia-Auto-Submit: Eric Rinehart <erinehart@google.com> Commit-Queue: Eric Rinehart <erinehart@google.com>
Fuchsia is an open source, general purpose operating system supporting modern 64-bit Intel and ARM processors.
We expect everyone interacting with our project to respect our code of conduct.
Read more about Fuchsia's principles.
See Getting Started.
See fuchsia.dev.