Module nonymous::emit [−][src]
Expand description
Builders for messages and other protocol elements.
These builders write protocol elements directly into the given packet buffer where possible.
Each protocol element defines a Builder
, which contains element-specific state and owns a
parent Builder
that it will release once built. The root of this hierarchy is Sink
,
which owns the actual packet buffer.
DNS has many variable-length protocol elements, so to reconcile this with our zero-copy
approach, the methods on the Builder
types form a state machine.
Limitations
Builder
is public, so external code can name the necessary trait bounds to pass and return
builders across function boundaries, but only internal code can implement builders that directly
interact with the Sink
. This is unfortunate but necessary to preserve the state machine’s
correctness guarantees.
Modules
Structs
The root builder.
Enums
Traits
A mutable packet buffer.
A trait for builders.
Starts a new builder with the given Builder
as its parent.