MCPcopy Create free account
hub / github.com/cloud-hypervisor/cloud-hypervisor / as_bytes_mut

Method as_bytes_mut

block/src/aligned_operation.rs:62–66  ·  view source on GitHub ↗

Returns the aligned buffer as a mutable slice.

(&mut self)

Source from the content-addressed store, hash-verified

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 {

Callers 1

execute_asyncMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected