fanotify/lib.rs
1pub mod high_level;
2pub mod low_level;
3
4pub trait FanotifyPath {
5 fn as_os_str(&self) -> &std::ffi::OsStr;
6}
7
8impl FanotifyPath for std::path::Path {
9 fn as_os_str(&self) -> &std::ffi::OsStr {
10 self.as_os_str()
11 }
12}
13
14impl FanotifyPath for str {
15 fn as_os_str(&self) -> &std::ffi::OsStr {
16 std::ffi::OsStr::new(self)
17 }
18}
19
20impl<T: AsRef<std::ffi::OsStr>> FanotifyPath for T {
21 fn as_os_str(&self) -> &std::ffi::OsStr {
22 self.as_ref()
23 }
24}