[][src]Trait unsafe_io::FromUnsafeSocket

pub trait FromUnsafeSocket {
    pub unsafe fn from_unsafe_socket(unsafe_socket: UnsafeSocket) -> Self;

    pub fn from_socketlike<IUS: IntoUnsafeSocket>(
        into_unsafe_socket: IUS
    ) -> Self
    where
        Self: Sized
, { ... } }

A trait for types which can be constructed from unsafe sockets.

Required methods

pub unsafe fn from_unsafe_socket(unsafe_socket: UnsafeSocket) -> Self[src]

Convert an unsafe socket into a Self.

Safety

The return value of this function may be used to dereference the given unsafe handle without using unsafe, so the caller must ensure that it doesn't outlive the underlying resource.

Loading content...

Provided methods

pub fn from_socketlike<IUS: IntoUnsafeSocket>(into_unsafe_socket: IUS) -> Self where
    Self: Sized
[src]

Convert from a type which implements IntoUnsafeSocket into a type that implements FromUnsafeSocket.

Loading content...

Implementors

impl<T: FromRawSocket> FromUnsafeSocket for T[src]

Loading content...