[−][src]Trait unsafe_io::AsUnsafeSocket
A trait for types which contain an unsafe socket and can expose it.
Required methods
pub fn as_unsafe_socket(&self) -> UnsafeSocket
[src]
Return the contained unsafe socket.
Provided methods
pub fn as_tcp_stream(&self) -> View<'_, TcpStream>
[src]
Utility for returning a value which dereferences to a &TcpStream
or
&mut TcpStream
.
Note that AsUnsafeSocket
may be implemented for types which are not
TCP streams, and which don't support all the methods on TcpStream
.
pub fn as_tcp_listener(&self) -> View<'_, TcpListener>
[src]
Utility for returning a value which dereferences to a &TcpListener
or
&mut TcpListener
.
Note that AsUnsafeSocket
may be implemented for types which are not
TCP listeners, and which don't support all the methods on
TcpListener
.
pub fn as_udp_socket(&self) -> View<'_, UdpSocket>
[src]
Utility for returning a value which dereferences to a &UdpSocket
or
&mut UdpSocket
.
Note that AsUnsafeSocket
may be implemented for types which are not
UDP sockets, and which don't support all the methods on UdpSocket
.
pub fn as_unix_stream(&self) -> View<'_, UnixStream>
[src]
Utility for returning a value which dereferences to a &UnixStream
or
&mut UnixStream
.
Note that AsUnsafeSocket
may be implemented for types which are not
Unix-domain socket streams, and which don't support all the methods on
UnixStream
.