Trait unsafe_io::FromUnsafeHandle[][src]

pub trait FromUnsafeHandle {
    unsafe fn from_unsafe_handle(unsafe_handle: UnsafeHandle) -> Self;
}
Expand description

A trait for types which can be constructed from an unsafe handle.

Note: Don’t implement this trait for types which require an UnsafeFile-like handle or an UnsafeSocket-like handle, such that it would need to panic if passed the wrong form.

Required methods

Constructs a new instance of Self from the given unsafe handle.

Safety

This function consumes ownership of the specified file descriptor. The returned object will take responsibility for closing it when the object goes out of scope.

Implementors