diff options
author | Gleb Pomykalov <gleb@lancastr.com> | 2020-04-08 12:41:56 +0300 |
---|---|---|
committer | Gleb Pomykalov <gleb@lancastr.com> | 2020-04-26 03:07:03 +0300 |
commit | 833369b2413a44ed0477cf8618e4088e523ca137 (patch) | |
tree | c246dfe95339d12f9d157312ce0b044fbda84cfe /src/sys/time.rs | |
parent | 490e979518256ae38823fd5f4c6c89005d39da84 (diff) | |
download | nix-833369b2413a44ed0477cf8618e4088e523ca137.zip |
Support sendmmsg/recvmmsg
Diffstat (limited to 'src/sys/time.rs')
-rw-r--r-- | src/sys/time.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/sys/time.rs b/src/sys/time.rs index 606bbd9d..06475001 100644 --- a/src/sys/time.rs +++ b/src/sys/time.rs @@ -67,6 +67,12 @@ impl AsRef<timespec> for TimeSpec { } } +impl AsMut<timespec> for TimeSpec { + fn as_mut(&mut self) -> &mut timespec { + &mut self.0 + } +} + impl Ord for TimeSpec { // The implementation of cmp is simplified by assuming that the struct is // normalized. That is, tv_nsec must always be within [0, 1_000_000_000) @@ -259,6 +265,12 @@ impl AsRef<timeval> for TimeVal { } } +impl AsMut<timeval> for TimeVal { + fn as_mut(&mut self) -> &mut timeval { + &mut self.0 + } +} + impl Ord for TimeVal { // The implementation of cmp is simplified by assuming that the struct is // normalized. That is, tv_usec must always be within [0, 1_000_000) |