Trait unsafe_io::FromUnsafeFile[][src]

pub trait FromUnsafeFile {
    unsafe fn from_unsafe_file(unsafe_file: UnsafeFile) -> Self;

    fn from_filelike<Filelike: IntoUnsafeFile>(filelike: Filelike) -> Self
    where
        Self: Sized
, { ... } }

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

Required methods

unsafe fn from_unsafe_file(unsafe_file: UnsafeFile) -> Self[src]

Convert an unsafe file 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

fn from_filelike<Filelike: IntoUnsafeFile>(filelike: Filelike) -> Self where
    Self: Sized
[src]

Convert from a type which implements IntoUnsafeFile into a type that implements FromUnsafeFile.

Loading content...

Implementors

impl<T: FromRawFd + OwnsRaw> FromUnsafeFile for T[src]

Loading content...