Trait netstack3_base::socket::SocketMapStateSpec
source · 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.
Object Safety§
This trait is not object safe.