pub struct MemoryBuffer { /* private fields */ }Expand description
CPU-backed memory buffer metadata and storage.
Implementations§
Source§impl MemoryBuffer
impl MemoryBuffer
Sourcepub fn as_slice(&self) -> &[u8] ⓘ
pub fn as_slice(&self) -> &[u8] ⓘ
Returns an immutable byte slice view over the whole allocation.
Sourcepub fn as_mut_slice(&mut self) -> &mut [u8] ⓘ
pub fn as_mut_slice(&mut self) -> &mut [u8] ⓘ
Returns a mutable byte slice view over the whole allocation.
Sourcepub fn as_ptr(&self) -> *const u8
pub fn as_ptr(&self) -> *const u8
Returns an immutable raw pointer to the beginning of the buffer.
Sourcepub fn as_mut_ptr(&mut self) -> *mut u8
pub fn as_mut_ptr(&mut self) -> *mut u8
Returns a mutable raw pointer to the beginning of the buffer.
Sourcepub fn strategy(&self) -> AllocationStrategy
pub fn strategy(&self) -> AllocationStrategy
Returns the allocation strategy used to create this buffer.
Trait Implementations§
Source§impl Debug for MemoryBuffer
impl Debug for MemoryBuffer
Source§impl From<MemoryBuffer> for Frame
impl From<MemoryBuffer> for Frame
Source§fn from(buffer: MemoryBuffer) -> Self
fn from(buffer: MemoryBuffer) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for MemoryBuffer
impl RefUnwindSafe for MemoryBuffer
impl !Send for MemoryBuffer
impl !Sync for MemoryBuffer
impl Unpin for MemoryBuffer
impl UnsafeUnpin for MemoryBuffer
impl UnwindSafe for MemoryBuffer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more