Struct parquet::memory::BufferPtr [−][src]
pub struct BufferPtr<T> { /* fields omitted */ }An representation of a slice on a reference-counting and read-only byte array. Sub-slices can be further created from this. The byte array will be released when all slices are dropped.
Methods
impl<T> BufferPtr<T>[src]
impl<T> BufferPtr<T>pub fn new(v: Vec<T>) -> Self[src]
pub fn new(v: Vec<T>) -> SelfCreates new buffer from a vector.
pub fn data(&self) -> &[T][src]
pub fn data(&self) -> &[T]Returns slice of data in this buffer.
pub fn with_range(self, start: usize, len: usize) -> Self[src]
pub fn with_range(self, start: usize, len: usize) -> SelfUpdates this buffer with new start position and length len.
Range should be within current start position and length.
pub fn with_mem_tracker(self, mc: MemTrackerPtr) -> Self[src]
pub fn with_mem_tracker(self, mc: MemTrackerPtr) -> SelfAdds memory tracker to this buffer.
pub fn start(&self) -> usize[src]
pub fn start(&self) -> usizeReturns start position of this buffer.
pub fn len(&self) -> usize[src]
pub fn len(&self) -> usizeReturns length of this buffer
pub fn is_mem_tracked(&self) -> bool[src]
pub fn is_mem_tracked(&self) -> boolReturns true if this buffer has memory tracker, false otherwise.
pub fn all(&self) -> BufferPtr<T>[src]
pub fn all(&self) -> BufferPtr<T>Returns a shallow copy of the buffer. Reference counted pointer to the data is copied.
pub fn start_from(&self, start: usize) -> BufferPtr<T>[src]
pub fn start_from(&self, start: usize) -> BufferPtr<T>Returns a shallow copy of the buffer that starts with start position.
pub fn range(&self, start: usize, len: usize) -> BufferPtr<T>[src]
pub fn range(&self, start: usize, len: usize) -> BufferPtr<T>Returns a shallow copy that is a range slice within this buffer.
Trait Implementations
impl<T: Clone> Clone for BufferPtr<T>[src]
impl<T: Clone> Clone for BufferPtr<T>fn clone(&self) -> BufferPtr<T>[src]
fn clone(&self) -> BufferPtr<T>Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl<T: Debug> Debug for BufferPtr<T>[src]
impl<T: Debug> Debug for BufferPtr<T>fn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl<T: Sized> Index<usize> for BufferPtr<T>[src]
impl<T: Sized> Index<usize> for BufferPtr<T>type Output = T
The returned type after indexing.
fn index(&self, index: usize) -> &T[src]
fn index(&self, index: usize) -> &TPerforms the indexing (container[index]) operation.
impl<T: Debug> Display for BufferPtr<T>[src]
impl<T: Debug> Display for BufferPtr<T>fn fmt(&self, f: &mut Formatter) -> FmtResult[src]
fn fmt(&self, f: &mut Formatter) -> FmtResultFormats the value using the given formatter. Read more
impl<T> Drop for BufferPtr<T>[src]
impl<T> Drop for BufferPtr<T>impl AsRef<[u8]> for BufferPtr<u8>[src]
impl AsRef<[u8]> for BufferPtr<u8>