We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5507629 commit 478594eCopy full SHA for 478594e
changelog/2718.added.md
@@ -0,0 +1 @@
1
+Add WatchDescriptor::as_raw, to get libc id of WatchDescriptor.
src/sys/inotify.rs
@@ -113,6 +113,12 @@ pub struct Inotify {
113
pub struct WatchDescriptor {
114
wd: i32,
115
}
116
+impl WatchDescriptor {
117
+ /// Raw WatchDescriptor, from libc.
118
+ pub fn as_raw(self) -> i32 {
119
+ self.wd
120
+ }
121
+}
122
123
/// A single inotify event.
124
///
@@ -270,4 +276,4 @@ impl From<Inotify> for OwnedFd {
270
276
fn from(value: Inotify) -> Self {
271
277
value.fd
272
278
273
-}
279
0 commit comments