We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 32bf2a2 commit 45a9cf4Copy full SHA for 45a9cf4
src/fd/mod.rs
@@ -85,6 +85,12 @@ pub struct OwnedFd<K: Kernel> {
85
phantom: PhantomData<*const ()>, // For !Send.
86
}
87
88
+impl<K: Kernel> OwnedFd<K> {
89
+ pub fn as_raw_fd(&self) -> c_int {
90
+ self.fd
91
+ }
92
+}
93
+
94
impl<K: Kernel> Drop for OwnedFd<K> {
95
fn drop(&mut self) {
96
// This drop must be called from the same process as the one that created the FD.
0 commit comments