pub trait SocketMapStateSpec {
type AddrVecTag: Eq + Copy + Debug + 'static;
type ListenerId: Clone + Debug;
type ConnId: Clone + Debug;
type ListenerSharingState: Clone + Debug;
type ConnSharingState: Clone + Debug;
type ListenerAddrState: SocketMapAddrStateSpec<Id = Self::ListenerId, SharingState = Self::ListenerSharingState> + Debug;
type ConnAddrState: SocketMapAddrStateSpec<Id = Self::ConnId, SharingState = Self::ConnSharingState> + Debug;
// Required methods
fn listener_tag(
info: ListenerAddrInfo,
state: &Self::ListenerAddrState,
) -> Self::AddrVecTag;
fn connected_tag(
has_device: bool,
state: &Self::ConnAddrState,
) -> Self::AddrVecTag;
}
Expand description
Specifies the types parameters for BoundSocketMap
state as a single bundle.
Required Associated Types§
Sourcetype AddrVecTag: Eq + Copy + Debug + 'static
type AddrVecTag: Eq + Copy + Debug + 'static
The tag value of a socket address vector entry.
These values are derived from Self::ListenerAddrState
and
Self::ConnAddrState
.
Sourcetype ListenerId: Clone + Debug
type ListenerId: Clone + Debug
An identifier for a listening socket.
Sourcetype ListenerSharingState: Clone + Debug
type ListenerSharingState: Clone + Debug
The state stored for a listening socket that is used to determine whether sockets can share an address.
Sourcetype ConnSharingState: Clone + Debug
type ConnSharingState: Clone + Debug
The state stored for a connected socket that is used to determine whether sockets can share an address.
Sourcetype ListenerAddrState: SocketMapAddrStateSpec<Id = Self::ListenerId, SharingState = Self::ListenerSharingState> + Debug
type ListenerAddrState: SocketMapAddrStateSpec<Id = Self::ListenerId, SharingState = Self::ListenerSharingState> + Debug
The state stored for a listener socket address.
Sourcetype ConnAddrState: SocketMapAddrStateSpec<Id = Self::ConnId, SharingState = Self::ConnSharingState> + Debug
type ConnAddrState: SocketMapAddrStateSpec<Id = Self::ConnId, SharingState = Self::ConnSharingState> + Debug
The state stored for a connected socket address.
Required Methods§
Sourcefn listener_tag(
info: ListenerAddrInfo,
state: &Self::ListenerAddrState,
) -> Self::AddrVecTag
fn listener_tag( info: ListenerAddrInfo, state: &Self::ListenerAddrState, ) -> Self::AddrVecTag
Returns a the tag for a listener in the socket map.
Sourcefn connected_tag(
has_device: bool,
state: &Self::ConnAddrState,
) -> Self::AddrVecTag
fn connected_tag( has_device: bool, state: &Self::ConnAddrState, ) -> Self::AddrVecTag
Returns a the tag for a connected socket in the socket map.
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.