Returns the aligned buffer as a mutable slice.
(&mut self)
| 60 | |
| 61 | /// Returns the aligned buffer as a mutable slice. |
| 62 | pub fn as_bytes_mut(&mut self) -> &mut [u8] { |
| 63 | // SAFETY: same invariant as as_bytes; &mut self rules out other |
| 64 | // simultaneous borrows. |
| 65 | unsafe { std::slice::from_raw_parts_mut(self.aligned_ptr, self.size) } |
| 66 | } |
| 67 | |
| 68 | /// Returns the guest address for this op. |
| 69 | pub fn data_addr(&self) -> GuestAddress { |