pub trait OwningBuffer<'a>: BorrowedMutBuffer<'a> {
// Required methods
unsafe fn push_points(&mut self, point_bytes: &[u8]);
fn resize(&mut self, count: usize);
fn clear(&mut self);
}Expand description
Trait for point buffers that own their memory. Compared to BorrowedMutBuffer, buffers that implement
this trait support the following additional capabilities:
- Pushing point data into the buffer using
push_points - Appending other buffers to the end of this buffer using
append,append_interleaved, andappend_columnar - Resizing and clearing the contents of the buffer using
resizeandclear
Required Methods§
Sourceunsafe fn push_points(&mut self, point_bytes: &[u8])
unsafe fn push_points(&mut self, point_bytes: &[u8])
Push the raw memory for a range of points into this buffer. Works similar to Vec::push
§Safety
point_bytes must contain the raw memory for a whole number of points in the PointLayout of this buffer.
This property is not checked at runtime, so this function is very unsafe!
§Panics
May panic if point_bytes.len() is not a multiple of self.point_layout().size_of_point_record()