[][src]Struct arrow::buffer::Buffer

pub struct Buffer { /* fields omitted */ }

Buffer is a contiguous memory region of fixed size and is aligned at a 64-byte boundary. Buffer is immutable.

Methods

impl Buffer[src]

pub fn from_raw_parts(ptr: *const u8, len: usize) -> Self[src]

Creates a buffer from an existing memory region (must already be byte-aligned)

pub fn len(&self) -> usize[src]

Returns the number of bytes in the buffer

pub fn is_empty(&self) -> bool[src]

Returns whether the buffer is empty.

pub fn data(&self) -> &[u8][src]

Returns the byte slice stored in this buffer

pub fn slice(&self, offset: usize) -> Self[src]

Returns a slice of this buffer, starting from offset.

pub fn raw_data(&self) -> *const u8[src]

Returns a raw pointer for this buffer.

Note that this should be used cautiously, and the returned pointer should not be stored anywhere, to avoid dangling pointers.

pub fn typed_data<T: ArrowNativeType + Num>(&self) -> &[T][src]

View buffer as typed slice.

pub fn empty() -> Self[src]

Returns an empty buffer.

Trait Implementations

impl Sync for Buffer[src]

impl Clone for Buffer[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl From<Buffer> for Bitmap[src]

impl<T: AsRef<[u8]>> From<T> for Buffer[src]

Creating a Buffer instance by copying the memory from a AsRef<[u8]> into a newly allocated memory region.

impl PartialEq<Buffer> for Buffer[src]

impl Send for Buffer[src]

impl Debug for Buffer[src]

impl<'_> Not for &'_ Buffer[src]

type Output = Buffer

The resulting type after applying the ! operator.

impl<'a, 'b> BitAnd<&'b Buffer> for &'a Buffer[src]

type Output = Result<Buffer>

The resulting type after applying the & operator.

impl<'a, 'b> BitOr<&'b Buffer> for &'a Buffer[src]

type Output = Result<Buffer>

The resulting type after applying the | operator.

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> FromCast<T> for T[src]

impl<T, U> Cast<U> for T where
    U: FromCast<T>, 
[src]