pub trait IntoFd {
    fn into_fd(self) -> OwnedFd;
}
Expand description

A trait to express the ability to consume an object and acquire ownership of its file descriptor.

Required methods

Consumes this object, returning the underlying file descriptor.

Example
use std::fs::File;
use io_lifetimes::{IntoFd, OwnedFd};

let f = File::open("foo.txt")?;
let owned_fd: OwnedFd = f.into_fd();

Implementations on Foreign Types

Implementors