pub struct FatBuffer<T: ?Sized, H: BufferHeader<T>, A: Allocator> { /* private fields */ }
Expand description
A slice allocation handle which stores the header metadata in the handle.
Trait Implementations§
Source§impl<T, H, A> ConstDefault for FatBuffer<T, H, A>where
H: BufferHeader<T>,
A: AllocatorDefault,
impl<T, H, A> ConstDefault for FatBuffer<T, H, A>where
H: BufferHeader<T>,
A: AllocatorDefault,
Source§impl<T: Debug + ?Sized, H: Debug + BufferHeader<T>, A: Debug + Allocator> Debug for FatBuffer<T, H, A>
impl<T: Debug + ?Sized, H: Debug + BufferHeader<T>, A: Debug + Allocator> Debug for FatBuffer<T, H, A>
Source§impl<T, I: Index, A: Allocator> VecBuffer for FatBuffer<T, VecHeader<I>, A>
impl<T, I: Index, A: Allocator> VecBuffer for FatBuffer<T, VecHeader<I>, A>
Source§unsafe fn set_length(&mut self, len: I)
unsafe fn set_length(&mut self, len: I)
Set the current length of the buffer. Read more
Source§fn grow_buffer(
&mut self,
capacity: Self::Index,
exact: bool,
) -> Result<(), StorageError>
fn grow_buffer( &mut self, capacity: Self::Index, exact: bool, ) -> Result<(), StorageError>
Attempt to resize this buffer to a new capacity. The
exact
flag determines
whether a larger capacity would be acceptable.Source§fn shrink_buffer(&mut self, capacity: Self::Index) -> Result<(), StorageError>
fn shrink_buffer(&mut self, capacity: Self::Index) -> Result<(), StorageError>
Attempt to resize this buffer to a new, smaller capacity.
Source§fn as_uninit_slice(&mut self) -> &mut [MaybeUninit<Self::Item>]
fn as_uninit_slice(&mut self) -> &mut [MaybeUninit<Self::Item>]
Access the contiguous memory contained in this buffer as a slice of
MaybeUnint<Self::Item>
. The length of this slice must correspond to
self.capacity()
.Source§fn as_slice(&self) -> &[Self::Item]
fn as_slice(&self) -> &[Self::Item]
Access the items contained in this buffer as a slice of
Self::Item
. The length
of this slice must correspond to self.length()
.Source§fn as_mut_slice(&mut self) -> &mut [Self::Item]
fn as_mut_slice(&mut self) -> &mut [Self::Item]
Access the items contained in this buffer as a mutable slice of
Self::Item
. The
length of this slice must correspond to self.length()
.Source§unsafe fn uninit_index(&mut self, index: usize) -> &mut MaybeUninit<Self::Item>
unsafe fn uninit_index(&mut self, index: usize) -> &mut MaybeUninit<Self::Item>
Access an index of the buffer as a mutable reference to a
MaybeUninit<Self::Item>
. Read moreimpl<T: ?Sized, H: BufferHeader<T>, A: AllocatorZeroizes> ZeroizeOnDrop for FatBuffer<T, H, A>
Auto Trait Implementations§
impl<T, H, A> Freeze for FatBuffer<T, H, A>
impl<T, H, A> RefUnwindSafe for FatBuffer<T, H, A>
impl<T, H, A> !Send for FatBuffer<T, H, A>
impl<T, H, A> !Sync for FatBuffer<T, H, A>
impl<T, H, A> Unpin for FatBuffer<T, H, A>
impl<T, H, A> UnwindSafe for FatBuffer<T, H, A>
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