Skip to main content

FilterContext

Trait FilterContext 

Source
pub trait FilterContext<BT: FilterBindingsTypes>: IpDeviceAddressIdContext<Ipv4, DeviceId: InterfaceProperties<BT::DeviceClass>> + IpDeviceAddressIdContext<Ipv6, DeviceId: InterfaceProperties<BT::DeviceClass>> {
    // Required method
    fn with_all_filter_state_mut<O, F: FnOnce(&mut State<Ipv4, <Self as IpDeviceAddressIdContext<Ipv4>>::WeakAddressId, BT>, &mut State<Ipv6, <Self as IpDeviceAddressIdContext<Ipv6>>::WeakAddressId, BT>) -> O>(
        &mut self,
        cb: F,
    ) -> O;
}
Expand description

A context for mutably accessing all filtering state at once, to allow IPv4 and IPv6 filtering state to be modified atomically.

Required Methods§

Source

fn with_all_filter_state_mut<O, F: FnOnce(&mut State<Ipv4, <Self as IpDeviceAddressIdContext<Ipv4>>::WeakAddressId, BT>, &mut State<Ipv6, <Self as IpDeviceAddressIdContext<Ipv6>>::WeakAddressId, BT>) -> O>( &mut self, cb: F, ) -> O

Calls the function with a mutable reference to all filtering state.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§