Trait netstack3_udp::UdpBindingsTypes

source ·
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§

source

type ExternalData<I: Ip>: Debug + Send + Sync + 'static

Opaque bindings data held by core for a given IP version.

Object Safety§

This trait is not object safe.

Implementors§