netstack3_base::socket

Trait 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.

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.

Implementors§