DatagramSocketDiagnosticsSpec

Trait DatagramSocketDiagnosticsSpec 

Source
pub trait DatagramSocketDiagnosticsSpec: DatagramSocketSpec {
    type DeviceClass;

    // Required methods
    fn transport_protocol_matches<I: IpExt, D: WeakDeviceIdentifier>(
        state: &SocketState<I, D, Self>,
        matcher: &SocketTransportProtocolMatcher,
    ) -> bool;
    fn cookie_matches<I: IpExt, D: WeakDeviceIdentifier>(
        id: &Self::SocketId<I, D>,
        matcher: &SocketCookieMatcher,
    ) -> bool;
}
Expand description

Implementation-specific functionality for matching datagram sockets.

Implementing this trait means that SocketStateForMatching will automatically implement IpSocketProperties for that datagram socket protocol.

Required Associated Types§

Source

type DeviceClass

The device class of physical interfaces used by the sockets.

Required Methods§

Source

fn transport_protocol_matches<I: IpExt, D: WeakDeviceIdentifier>( state: &SocketState<I, D, Self>, matcher: &SocketTransportProtocolMatcher, ) -> bool

Returns whether the provided state is matched by the transport protocol matcher matcher.

Source

fn cookie_matches<I: IpExt, D: WeakDeviceIdentifier>( id: &Self::SocketId<I, D>, matcher: &SocketCookieMatcher, ) -> bool

Returns whether the provided id is matched by the cookie matcher matcher.

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§