Skip to main content

DynamicTransportSerializer

Trait DynamicTransportSerializer 

Source
pub trait DynamicTransportSerializer<I: FilterIpExt>:
    DynamicNetworkSerializer
    + DynamicNetworkPartialSerializer
    + MaybeTransportPacket
    + DynamicMaybeTransportPacketMut<I>
    + DynamicMaybeIcmpErrorMut<I>
    + MaybeIcmpErrorPayload<I>
    + NotSegmentableTransportSerializer { }
Expand description

A trait allowing transport serializers to be put behind a dyn reference.

This is dynamic-dispatch equivalent of TransportPacketSerializer. Used in conjunction with DynTransportSerializer it allows dynamic dispatch for slow-path protocols.

Only serializers that acknowledge they can’t be segmented in software (via NotSegmentableTransportSerializer) may be used dynamically, since this API does not expose segmentation and so GSO is unsupported here.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<O, I> DynamicTransportSerializer<I> for O
where I: FilterIpExt, O: TransportPacketSerializer<I> + NotSegmentableTransportSerializer + DynamicMaybeTransportPacketMut<I> + DynamicMaybeIcmpErrorMut<I>,