Trait swap_buffer_queue::buffer::InsertIntoBuffer
source · pub unsafe trait InsertIntoBuffer<B: Buffer> {
// Required methods
fn size(&self) -> usize;
unsafe fn insert_into(self, buffer: &B, index: usize);
}
Expand description
Buffer
value.
Safety
Range index..index+value.size()
is considered inserted into the buffer after calling
InsertIntoBuffer::insert_into
(see Buffer::slice
/Buffer::clear
)
Required Methods§
sourceunsafe fn insert_into(self, buffer: &B, index: usize)
unsafe fn insert_into(self, buffer: &B, index: usize)
Inserts the value into the buffer at the given index.
Safety
For every call to this method, the inserted range index..index+self.size()
must not
overlap with a previously inserted one.
Implementations on Foreign Types§
source§impl<B, T, const N: usize> InsertIntoBuffer<B> for [T; N]where
B: CellBuffer<T>,
impl<B, T, const N: usize> InsertIntoBuffer<B> for [T; N]where
B: CellBuffer<T>,
Implementors§
impl<B, I, T> InsertIntoBuffer<B> for ValueIter<I>where
B: CellBuffer<T>,
I: Iterator<Item = T> + ExactSizeIterator,
impl<T, const HEADER_SIZE: usize, const TRAILER_SIZE: usize> InsertIntoBuffer<WriteVecBuffer<HEADER_SIZE, TRAILER_SIZE>> for Twhere
T: WriteBytesSlice,
Available on crate features
std
and write
only.impl<T, const N: usize, const HEADER_SIZE: usize, const TRAILER_SIZE: usize> InsertIntoBuffer<WriteArrayBuffer<N, HEADER_SIZE, TRAILER_SIZE>> for Twhere
T: WriteBytesSlice,
Available on crate feature
write
only.