pub trait SocketMapUpdateSharingPolicy<Addr, SharingState, I: Ip, D: DeviceIdentifier, A>: SocketMapConflictPolicy<Addr, SharingState, I, D, A>where
A: SocketMapAddrSpec,{
// 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§
Sourcefn allows_sharing_update(
socketmap: &SocketMap<AddrVec<I, D, A>, Bound<Self>>,
addr: &Addr,
old_sharing: &SharingState,
new_sharing: &SharingState,
) -> Result<(), UpdateSharingError>
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.