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§

source

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.

source

type ListenerId: Clone + Debug

An identifier for a listening socket.

source

type ConnId: Clone + Debug

An identifier for a connected socket.

source

type ListenerSharingState: Clone + Debug

The state stored for a listening socket that is used to determine whether sockets can share an address.

source

type ConnSharingState: Clone + Debug

The state stored for a connected socket that is used to determine whether sockets can share an address.

source

type ListenerAddrState: SocketMapAddrStateSpec<Id = Self::ListenerId, SharingState = Self::ListenerSharingState> + Debug

The state stored for a listener socket address.

source

type ConnAddrState: SocketMapAddrStateSpec<Id = Self::ConnId, SharingState = Self::ConnSharingState> + Debug

The state stored for a connected socket address.

Required Methods§

source

fn listener_tag( info: ListenerAddrInfo, state: &Self::ListenerAddrState, ) -> Self::AddrVecTag

Returns a the tag for a listener in the socket map.

source

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.

Implementors§