pub struct BufferImpl<'a, H: Borrow<A>, A: ?Sized + BufferAllocator> { /* private fields */ }Implementations§
Source§impl<'a, H: Borrow<A>, A: ?Sized + BufferAllocator> BufferImpl<'a, H, A>
impl<'a, H: Borrow<A>, A: ?Sized + BufferAllocator> BufferImpl<'a, H, A>
Sourcepub fn subslice<R: SliceRange>(&self, range: R) -> BufferRef<'_>
pub fn subslice<R: SliceRange>(&self, range: R) -> BufferRef<'_>
Takes a read-only reference to this buffer over range (which must be within the size of
the buffer).
Sourcepub fn as_mut(&mut self) -> MutableBufferRef<'_>
pub fn as_mut(&mut self) -> MutableBufferRef<'_>
Takes a read-write reference to this buffer.
Sourcepub fn subslice_mut<R: SliceRange>(&mut self, range: R) -> MutableBufferRef<'_>
pub fn subslice_mut<R: SliceRange>(&mut self, range: R) -> MutableBufferRef<'_>
Takes a read-write reference to this buffer over range (which must be within the size of
the buffer).
Sourcepub fn as_mut_slice(&mut self) -> &mut [u8] ⓘ
pub fn as_mut_slice(&mut self) -> &mut [u8] ⓘ
Returns a mutable slice of the buffer’s contents.
Sourcepub fn copy_to_slice(&self, dest: &mut [u8])
pub fn copy_to_slice(&self, dest: &mut [u8])
Sourcepub fn copy_from_slice(&mut self, src: &[u8])
pub fn copy_from_slice(&mut self, src: &[u8])
Sourcepub fn range(&self) -> Range<usize>
pub fn range(&self) -> Range<usize>
Returns the range in the underlying BufferSource that this buffer covers.
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 buffer’s contents.
Sourcepub fn as_ptr_slice(&self) -> PtrByteSlice<'_>
pub fn as_ptr_slice(&self) -> PtrByteSlice<'_>
Returns a read-only pointer slice over the buffer.
Sourcepub fn as_mut_ptr_slice(&mut self) -> MutPtrByteSlice<'_>
pub fn as_mut_ptr_slice(&mut self) -> MutPtrByteSlice<'_>
Returns a mutable pointer slice over the buffer.
Trait Implementations§
Source§impl<'a, H: Debug + Borrow<A>, A: Debug + ?Sized + BufferAllocator> Debug for BufferImpl<'a, H, A>
impl<'a, H: Debug + Borrow<A>, A: Debug + ?Sized + BufferAllocator> Debug for BufferImpl<'a, H, A>
Source§impl<'a, H: Borrow<A>, A: ?Sized + BufferAllocator> Drop for BufferImpl<'a, H, A>
impl<'a, H: Borrow<A>, A: ?Sized + BufferAllocator> Drop for BufferImpl<'a, H, A>
Auto Trait Implementations§
impl<'a, H, A> !UnwindSafe for BufferImpl<'a, H, A>
impl<'a, H, A> Freeze for BufferImpl<'a, H, A>
impl<'a, H, A> RefUnwindSafe for BufferImpl<'a, H, A>where
H: RefUnwindSafe,
A: ?Sized,
impl<'a, H, A> Send for BufferImpl<'a, H, A>
impl<'a, H, A> Sync for BufferImpl<'a, H, A>
impl<'a, H, A> Unpin for BufferImpl<'a, H, A>
impl<'a, H, A> UnsafeUnpin for BufferImpl<'a, H, A>where
H: UnsafeUnpin,
A: ?Sized,
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