Struct UnfilterRegion

pub struct UnfilterRegion { pub available: usize, pub filled: usize }

UnfilterRegion divides a Vec<u8> buffer into three consecutive regions:

Even though only vector[0..available] bytes can be mutated, it is allowed to "shift" or "move" the contents of vector, as long as the:

Violating the invariants described above (e.g. mutating the bytes in the vector[available..filled] region) may result in absurdly wacky decompression output or panics, but not undefined behavior.

Fields

available: usize

The past-the-end index of the region that is allowed to be modified.

filled: usize

The past-the-end index of the region with decompressed bytes.

Implementations

impl UnfilterRegion

fn as_buf<'data>(&'data mut self, buffer: &'data mut Vec<u8>) -> UnfilterBuf<'data>

Use this region to decompress new filtered rowline data.

Pass the wrapped buffer to [StreamingDecoder::update]super::stream::StreamingDecoder::update to fill it with data and update the region indices.

May panic if invariants of UnfilterRegion are violated.

Trait Implementations

impl Clone for UnfilterRegion

fn clone(&self) -> Self

impl Copy for UnfilterRegion

impl Default for UnfilterRegion

fn default() -> Self

Auto Trait Implementations

impl Freeze for UnfilterRegion

impl RefUnwindSafe for UnfilterRegion

impl Send for UnfilterRegion

impl Sync for UnfilterRegion

impl Unpin for UnfilterRegion

impl UnsafeUnpin for UnfilterRegion

impl UnwindSafe for UnfilterRegion

Blanket Implementations

impl<T> Any for UnfilterRegion where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for UnfilterRegion where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for UnfilterRegion where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> CloneToUninit for UnfilterRegion where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for UnfilterRegion

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for UnfilterRegion where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T, U> Into<U> for UnfilterRegion where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for UnfilterRegion where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

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

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>