pub trait MaybeTransportPacketMut<I: IpExt> {
type TransportPacketMut<'a>: TransportPacketMut<I>
where Self: 'a;
// Required method
fn transport_packet_mut(&mut self) -> Option<Self::TransportPacketMut<'_>>;
}
Expand description
A payload of an IP packet that may be a valid modifiable transport layer packet.
This trait exists to allow bubbling up the trait bound that a serializer
type implement MaybeTransportPacketMut
from the IP socket layer to upper
layers, where it can be implemented separately on each concrete packet type
depending on whether it supports packet header modification.
Required Associated Types§
Sourcetype TransportPacketMut<'a>: TransportPacketMut<I>
where
Self: 'a
type TransportPacketMut<'a>: TransportPacketMut<I> where Self: 'a
The type that provides access to transport-layer header modification, if this is indeed a valid transport packet.
Required Methods§
Sourcefn transport_packet_mut(&mut self) -> Option<Self::TransportPacketMut<'_>>
fn transport_packet_mut(&mut self) -> Option<Self::TransportPacketMut<'_>>
Optionally returns a type that provides mutable access to this transport-layer packet.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.