in parquet/src/arrow/record_reader/buffer.rs [34:87]
fn consume(&mut self) -> Self::Output;
/// Returns a [`Self::Slice`] with at least `batch_size` capacity that can be used
/// to append data to the end of this [`BufferQueue`]
///
/// NB: writes to the returned slice will not update the length of [`BufferQueue`]
/// instead a subsequent call should be made to [`BufferQueue::set_len`]
fn spare_capacity_mut(&mut self, batch_size: usize) -> &mut Self::Slice;
/// Sets the length of the [`BufferQueue`].
///
/// Intended to be used in combination with [`BufferQueue::spare_capacity_mut`]
///
/// # Panics
///
/// Implementations must panic if `len` is beyond the initialized length
///
/// Implementations may panic if `set_len` is called with less than what has been written
///
/// This distinction is to allow for implementations that return a default initialized
/// [BufferQueue::Slice`] which doesn't track capacity and length separately
///
/// For example, [`BufferQueue`] returns a default-initialized `&mut [T]`, and does not
/// track how much of this slice is actually written to by the caller. This is still
/// safe as the slice is default-initialized.
///
fn set_len(&mut self, len: usize);
}
/// A marker trait for [scalar] types
///
/// This means that a `[Self::default()]` of length `len` can be safely created from a
/// zero-initialized `[u8]` with length `len * std::mem::size_of::<Self>()` and
/// alignment of `std::mem::size_of::<Self>()`
///
/// [scalar]: https://doc.rust-lang.org/book/ch03-02-data-types.html#scalar-types
///
pub trait ScalarValue: Copy {}
impl ScalarValue for bool {}
impl ScalarValue for u8 {}
impl ScalarValue for i8 {}
impl ScalarValue for u16 {}
impl ScalarValue for i16 {}
impl ScalarValue for u32 {}
impl ScalarValue for i32 {}
impl ScalarValue for u64 {}
impl ScalarValue for i64 {}
impl ScalarValue for f32 {}
impl ScalarValue for f64 {}
impl ScalarValue for Int96 {}
/// A typed buffer similar to [`Vec<T>`] but using [`MutableBuffer`] for storage
#[derive(Debug)]
pub struct ScalarBuffer<T: ScalarValue> {