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.

Object Safety§

This trait is not object safe.

Implementors§