pub trait UdpBindingsTypes: Sized + 'static {
type ExternalData<I: Ip>: Debug + Send + Sync + 'static;
}
Expand description
The bindings context providing external types to UDP sockets.
§Discussion
We’d like this trait to take an I
type parameter instead of using GAT to
get the IP version, however we end up with problems due to the shape of
DatagramSocketSpec
and the underlying support for dual stack sockets.
This is completely fine for all known implementations, except for a rough
edge in fake tests bindings contexts that are already parameterized on I
themselves. This is still better than relying on Box<dyn Any>
to keep the
external data in our references so we take the rough edge.
Required Associated Types§
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.