Skip to main content

MaybeSocketTransportProperties

Trait MaybeSocketTransportProperties 

Source
pub trait MaybeSocketTransportProperties {
    type TcpProps<'a>: TcpSocketProperties
       where Self: 'a;
    type UdpProps<'a>: UdpSocketProperties
       where Self: 'a;

    // Required methods
    fn tcp_socket_properties(&self) -> Option<&Self::TcpProps<'_>>;
    fn udp_socket_properties(&self) -> Option<&Self::UdpProps<'_>>;
}
Expand description

Provides optional access to TCP socket properties.

Required Associated Types§

Source

type TcpProps<'a>: TcpSocketProperties where Self: 'a

The type that encapsulates TCP socket properties.

Source

type UdpProps<'a>: UdpSocketProperties where Self: 'a

The type that encapsulates UDP socket properties.

Required Methods§

Source

fn tcp_socket_properties(&self) -> Option<&Self::TcpProps<'_>>

Returns TCP socket properties if the socket is a TCP socket.

Source

fn udp_socket_properties(&self) -> Option<&Self::UdpProps<'_>>

Returns UDP socket properties if the socket is a UDP socket.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl MaybeSocketTransportProperties for !

Source§

type TcpProps<'a> = ! where Self: 'a

Source§

type UdpProps<'a> = ! where Self: 'a

Source§

fn tcp_socket_properties(&self) -> Option<&Self::TcpProps<'_>>

Source§

fn udp_socket_properties(&self) -> Option<&Self::UdpProps<'_>>

Implementors§