[][src]Struct arrow::buffer::MutableBuffer

pub struct MutableBuffer { /* fields omitted */ }

Similar to Buffer, but is growable and can be mutated. A mutable buffer can be converted into a immutable buffer via the freeze method.

Methods

impl MutableBuffer
[src]

Allocate a new mutable buffer with initial capacity to be capacity.

Set the bits in the range of [0, end) to 0 (if val is false), or 1 (if val is true). Also extend the length of this buffer to be end.

This is useful when one wants to clear (or set) the bits and then manipulate the buffer directly (e.g., modifying the buffer by holding a mutable reference from data_mut()).

Ensure that count bytes from start contain zero bits

This is used to initialize the bits in a buffer, however, it has no impact on the len of the buffer and so can be used to initialize the memory region from len to capacity.

Ensures that this buffer has at least capacity slots in this buffer. This will also ensure the new capacity will be a multiple of 64 bytes.

Returns the new capacity for this buffer.

Resizes the buffer so that the len will equal to the new_len.

If new_len is greater than len, the buffer's length is simply adjusted to be the former, optionally extending the capacity. The data between len and new_len will remain unchanged.

If new_len is less than len, the buffer will be truncated.

Returns whether this buffer is empty or not.

Returns the length (the number of bytes written) in this buffer.

Returns the total capacity in this buffer.

Clear all existing data from this buffer.

Returns the data stored in this buffer as a slice.

Returns the data stored in this buffer as a mutable slice.

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.

Freezes this buffer and return an immutable version of it.

Trait Implementations

impl PartialEq<MutableBuffer> for MutableBuffer
[src]

This method tests for !=.

impl Drop for MutableBuffer
[src]

impl Send for MutableBuffer
[src]

impl Sync for MutableBuffer
[src]

impl Debug for MutableBuffer
[src]

impl Write for MutableBuffer
[src]

Attempts to write an entire buffer into this write. Read more

Writes a formatted string into this writer, returning any error encountered. Read more

Creates a "by reference" adaptor for this instance of Write. Read more

Blanket Implementations

impl<T> From for T
[src]

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.