pub trait SegmentableTransportBuilder {
type SegmentBuilder: PacketBuilder<NetworkSerializationContext> + NestablePacketBuilder;
// Required method
fn segment_builder(
&self,
offset: u16,
has_more: bool,
) -> Self::SegmentBuilder;
}Expand description
A template for the transport header of each of the segments a packet is split into.
This is the transport-layer counterpart of [SegmentableIpPacketBuilder].
Implemented both for owned builders and for references to them, so a
template the stack already holds can be used without copying it up front.
Required Associated Types§
Sourcetype SegmentBuilder: PacketBuilder<NetworkSerializationContext> + NestablePacketBuilder
type SegmentBuilder: PacketBuilder<NetworkSerializationContext> + NestablePacketBuilder
The builder for a single segment’s transport header.
Required Methods§
Sourcefn segment_builder(&self, offset: u16, has_more: bool) -> Self::SegmentBuilder
fn segment_builder(&self, offset: u16, has_more: bool) -> Self::SegmentBuilder
Returns the header builder for the segment carrying the payload bytes
starting at offset.
has_more indicates that further segments follow this one.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".