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§
Sourcetype TcpProps<'a>: TcpSocketProperties
where
Self: 'a
type TcpProps<'a>: TcpSocketProperties where Self: 'a
The type that encapsulates TCP socket properties.
Sourcetype UdpProps<'a>: UdpSocketProperties
where
Self: 'a
type UdpProps<'a>: UdpSocketProperties where Self: 'a
The type that encapsulates UDP socket properties.
Required Methods§
Sourcefn tcp_socket_properties(&self) -> Option<&Self::TcpProps<'_>>
fn tcp_socket_properties(&self) -> Option<&Self::TcpProps<'_>>
Returns TCP socket properties if the socket is a TCP socket.
Sourcefn udp_socket_properties(&self) -> Option<&Self::UdpProps<'_>>
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", so this trait is not object safe.