(self)
| 66 | |
| 67 | impl LockType { |
| 68 | pub const fn to_libc_val(self) -> libc::c_int { |
| 69 | match self { |
| 70 | Self::Unlock => libc::F_UNLCK as libc::c_int, |
| 71 | Self::Write => libc::F_WRLCK as libc::c_int, |
| 72 | Self::Read => libc::F_RDLCK as libc::c_int, |
| 73 | } |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | /// Describes the current state of a lock. |