Struct lodepng::CVec
[-]
[+]
[src]
pub struct CVec<T> {
// some fields omitted
}Horrible kludge to free memory allocated by lodepng
Methods
impl<T> CVec<T>
unsafe fn new(ptr: *mut T, elements: usize) -> CVec<T>
fn len(&self) -> usize
Number of elements (pixels for pixel type, bytes for u8 type only)
fn to_vec(&self) -> Vec<T>
Copies elements into a Vec
fn as_mut_slice<'a>(&'a mut self) -> &'a mut [T]
Exposes memory as slice without copying
fn as_u8_slice<'a>(&'a self) -> &'a [u8]
Exposes memory as raw bytes slice without copying