(&self)
| 94 | #[cfg(unix)] |
| 95 | impl std::os::fd::AsFd for Fildes { |
| 96 | fn as_fd(&self) -> std::os::fd::BorrowedFd<'_> { |
| 97 | // SAFETY: none, really. but, python's os api of passing around file descriptors |
| 98 | // everywhere isn't really io-safe anyway, so, this is passed to the user. |
| 99 | unsafe { std::os::fd::BorrowedFd::borrow_raw(self.0) } |
| 100 | } |
| 101 | } |
| 102 | #[cfg(unix)] |
| 103 | impl std::os::fd::AsRawFd for Fildes { |