netstack3_base::socket

Trait SocketMapUpdateSharingPolicy

Source
pub trait SocketMapUpdateSharingPolicy<Addr, SharingState, I: Ip, D: DeviceIdentifier, A>: SocketMapConflictPolicy<Addr, SharingState, I, D, A>{
    // Required method
    fn allows_sharing_update(
        socketmap: &SocketMap<AddrVec<I, D, A>, Bound<Self>>,
        addr: &Addr,
        old_sharing: &SharingState,
        new_sharing: &SharingState,
    ) -> Result<(), UpdateSharingError>;
}
Expand description

Defines the policy for updating the sharing state of entries in the SocketMap.

Required Methods§

Source

fn allows_sharing_update( socketmap: &SocketMap<AddrVec<I, D, A>, Bound<Self>>, addr: &Addr, old_sharing: &SharingState, new_sharing: &SharingState, ) -> Result<(), UpdateSharingError>

Returns whether the entry addr in socketmap allows the sharing state to transition from old_sharing to new_sharing.

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§