BindingsPacketMatcher

Trait BindingsPacketMatcher 

Source
pub trait BindingsPacketMatcher<D> {
    // Required method
    fn matches<I, P>(
        &self,
        packet: &P,
        interfaces: Interfaces<'_, D>,
        meta: &impl FilterPacketMetadata,
    ) -> bool
       where I: FilterIpExt,
             P: FilterIpPacket<I>;
}
Expand description

A trait for external matchers supplied by bindings.

Required Methods§

Source

fn matches<I, P>( &self, packet: &P, interfaces: Interfaces<'_, D>, meta: &impl FilterPacketMetadata, ) -> bool
where I: FilterIpExt, P: FilterIpPacket<I>,

Returns true if the packet matches.

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.

Implementations on Foreign Types§

Source§

impl<D> BindingsPacketMatcher<D> for Infallible

Source§

fn matches<I, P>( &self, _packet: &P, _interfaces: Interfaces<'_, D>, _meta: &impl FilterPacketMetadata, ) -> bool
where I: FilterIpExt, P: FilterIpPacket<I>,

Source§

impl<D, M> BindingsPacketMatcher<D> for Arc<M>

Source§

fn matches<I, P>( &self, packet: &P, interfaces: Interfaces<'_, D>, meta: &impl FilterPacketMetadata, ) -> bool
where I: FilterIpExt, P: FilterIpPacket<I>,

Implementors§