Trait io_lifetimes::AsSocketlike [−][src]
pub trait AsSocketlike<'socketlike>: AsFd<'socketlike> { fn as_socketlike(self) -> BorrowedSocketlike<'socketlike>; fn as_socketlike_view<Target: FromSocketlike + IntoSocketlike>(
self
) -> SocketlikeView<'socketlike, Target>; }
Expand description
A portable trait to borrow a reference from an underlying socketlike object.
This is a portability abstraction over Unix-like AsFd
and Windows’
AsSocket
. It also provides the as_socketlike_view
convenience
function providing typed views.
Required methods
fn as_socketlike(self) -> BorrowedSocketlike<'socketlike>
[src]
fn as_socketlike(self) -> BorrowedSocketlike<'socketlike>
[src]Borrows the reference.
fn as_socketlike_view<Target: FromSocketlike + IntoSocketlike>(
self
) -> SocketlikeView<'socketlike, Target>
[src]
fn as_socketlike_view<Target: FromSocketlike + IntoSocketlike>(
self
) -> SocketlikeView<'socketlike, Target>
[src]Return a borrowing view of a resource which dereferences to a &Target
or &mut Target
.
Implementors
fn as_socketlike_view<Target: FromSocketlike + IntoSocketlike>(
self
) -> SocketlikeView<'socketlike, Target>
[src]