[][src]Struct parquet::memory::Buffer

pub struct Buffer<T: Clone> { /* fields omitted */ }

A resize-able buffer class with generic member, with optional memory tracker.

Note that a buffer has two attributes: capacity and size: the former is the total number of space reserved for the buffer, while the latter is the actual number of elements. Invariant: capacity >= size. The total allocated bytes for a buffer equals to capacity * sizeof<T>().

Methods

impl<T: Clone> Buffer<T>
[src]

Creates new empty buffer.

Adds MemTracker for this buffer.

Returns slice of data in this buffer.

Sets data for this buffer.

Resizes underlying data in place to a new length new_size.

If new_size is less than current length, data is truncated, otherwise, it is extended to new_size with provided default value init_value.

Memory tracker is also updated, if available.

Clears underlying data.

Reserves capacity additional_capacity for underlying data vector.

Memory tracker is also updated, if available.

Returns BufferPtr with buffer data. Buffer data is reset.

Adds value to the buffer.

Returns current capacity for the buffer.

Returns current size for the buffer.

Returns true if memory tracker is added to buffer, false otherwise.

Returns memory tracker associated with this buffer. This may panic, if memory tracker is not set, use method above to check if memory tracker is available.

Trait Implementations

impl From<Buffer<u8>> for ByteArray
[src]

Performs the conversion.

impl AsRef<[u8]> for Buffer<u8>
[src]

Performs the conversion.

impl<T: Clone> Drop for Buffer<T>
[src]

Executes the destructor for this type. Read more

impl<T: Sized + Clone> Index<usize> for Buffer<T>
[src]

The returned type after indexing.

Performs the indexing (container[index]) operation.

impl<T: Sized + Clone> IndexMut<usize> for Buffer<T>
[src]

Performs the mutable indexing (container[index]) operation.

impl Write for Buffer<u8>
[src]

Write a buffer into this object, returning how many bytes were written. Read more

Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more

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

Auto Trait Implementations

impl<T> !Send for Buffer<T>

impl<T> !Sync for Buffer<T>

Blanket Implementations

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

Performs the conversion.

impl<T> From for T
[src]

Performs the conversion.

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.

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

Performs the conversion.

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

Immutably borrows from an owned value. Read more

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.

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

Performs the conversion.

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

Mutably borrows from an owned value. Read more

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

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

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more

impl<W> WriteBytesExt for W where
    W: Write + ?Sized

Writes an unsigned 8 bit integer to the underlying writer. Read more

Writes a signed 8 bit integer to the underlying writer. Read more

Writes an unsigned 16 bit integer to the underlying writer. Read more

Writes a signed 16 bit integer to the underlying writer. Read more

Writes an unsigned 24 bit integer to the underlying writer. Read more

Writes a signed 24 bit integer to the underlying writer. Read more

Writes an unsigned 32 bit integer to the underlying writer. Read more

Writes a signed 32 bit integer to the underlying writer. Read more

Writes an unsigned 48 bit integer to the underlying writer. Read more

Writes a signed 48 bit integer to the underlying writer. Read more

Writes an unsigned 64 bit integer to the underlying writer. Read more

Writes a signed 64 bit integer to the underlying writer. Read more

Writes an unsigned n-bytes integer to the underlying writer. Read more

Writes a signed n-bytes integer to the underlying writer. Read more

Writes a IEEE754 single-precision (4 bytes) floating point number to the underlying writer. Read more

Writes a IEEE754 double-precision (8 bytes) floating point number to the underlying writer. Read more

impl<T> TWriteTransport for T where
    T: Write

impl<W> WriteBytesExt for W where
    W: Write + ?Sized
[src]

Writes an unsigned 8 bit integer to the underlying writer. Read more

Writes a signed 8 bit integer to the underlying writer. Read more

Writes an unsigned 16 bit integer to the underlying writer.

Writes a signed 16 bit integer to the underlying writer.

Writes an unsigned 32 bit integer to the underlying writer.

Writes a signed 32 bit integer to the underlying writer.

Writes an unsigned 64 bit integer to the underlying writer.

Writes a signed 64 bit integer to the underlying writer.

Writes an unsigned n-bytes integer to the underlying writer. Read more

Writes a signed n-bytes integer to the underlying writer. Read more

Writes a IEEE754 single-precision (4 bytes) floating point number to the underlying writer. Read more

Writes a IEEE754 double-precision (8 bytes) floating point number to the underlying writer. Read more

impl<Inner> VarIntWriter for Inner where
    Inner: Write

impl<T, U> TryInto for T where
    U: TryFrom<T>, 

impl<W> FixedIntWriter for W where
    W: Write

impl<E> SpecializationError for E
[src]

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

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Create an error for a missing method specialization. Defaults to panicking with type, trait & method names. S is the encoder/decoder state type, T is the type being encoded/decoded, and the arguments are the names of the trait and method that should've been overridden. Read more

impl<T> Erased for T
[src]

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

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

impl<W> WriteBytesExt for W where
    W: Write + ?Sized
[src]

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

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Writes an unsigned 8 bit integer to the underlying writer. Read more

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

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Writes a signed 8 bit integer to the underlying writer. Read more

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

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Writes an unsigned 16 bit integer to the underlying writer. Read more

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

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Writes a signed 16 bit integer to the underlying writer. Read more

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

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Writes an unsigned 24 bit integer to the underlying writer. Read more

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

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Writes a signed 24 bit integer to the underlying writer. Read more

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

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Writes an unsigned 32 bit integer to the underlying writer. Read more

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

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Writes a signed 32 bit integer to the underlying writer. Read more

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

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Writes an unsigned 64 bit integer to the underlying writer. Read more

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

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Writes a signed 64 bit integer to the underlying writer. Read more

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

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Writes an unsigned 128 bit integer to the underlying writer.

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

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Writes a signed 128 bit integer to the underlying writer.

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

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Writes an unsigned n-bytes integer to the underlying writer. Read more

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

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Writes a signed n-bytes integer to the underlying writer. Read more

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

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Writes an unsigned n-bytes integer to the underlying writer. Read more

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

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Writes a signed n-bytes integer to the underlying writer. Read more

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

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Writes a IEEE754 single-precision (4 bytes) floating point number to the underlying writer. Read more

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

this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?

Writes a IEEE754 double-precision (8 bytes) floating point number to the underlying writer. Read more

impl<T> Erased for T