pub trait IntoFd {
// Required method
fn into_fd(self) -> OwnedFd;
}
👎Deprecated since 1.0.0:
IntoFd
is replaced by From<...> for OwnedFd
or Into<OwnedFd>
Expand description
A trait to express the ability to consume an object and acquire ownership of its file descriptor.
Required Methods§
sourcefn into_fd(self) -> OwnedFd
👎Deprecated since 1.0.0: IntoFd
is replaced by From<...> for OwnedFd
or Into<OwnedFd>
fn into_fd(self) -> OwnedFd
IntoFd
is replaced by From<...> for OwnedFd
or Into<OwnedFd>
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();