Trait netstack3_base::socket::SocketMapConflictPolicy

source ·
pub trait SocketMapConflictPolicy<Addr, SharingState, I: Ip, D: DeviceIdentifier, A: SocketMapAddrSpec>: SocketMapStateSpec {
    // Required method
    fn check_insert_conflicts(
        new_sharing_state: &SharingState,
        addr: &Addr,
        socketmap: &SocketMap<AddrVec<I, D, A>, Bound<Self>>,
    ) -> Result<(), InsertError>;
}
Expand description

Provides conflict detection for a SocketMapStateSpec.

Required Methods§

source

fn check_insert_conflicts( new_sharing_state: &SharingState, addr: &Addr, socketmap: &SocketMap<AddrVec<I, D, A>, Bound<Self>>, ) -> Result<(), InsertError>

Checks whether a new socket with the provided state can be inserted at the given address in the existing socket map, returning an error otherwise.

Implementations of this function should check for any potential conflicts that would arise when inserting a socket with state new_sharing_state into a new or existing entry at addr in socketmap.

Object Safety§

This trait is not object safe.

Implementors§