pub struct CompressionTree<'a> { /* private fields */ }
Implementations§
source§impl<'a> CompressionTree<'a>
impl<'a> CompressionTree<'a>
pub fn flat(compressor: &'a dyn EncodingCompressor) -> Self
pub fn new( compressor: &'a dyn EncodingCompressor, children: Vec<Option<CompressionTree<'a>>>, ) -> Self
pub fn child(&self, idx: usize) -> Option<&CompressionTree<'a>>
sourcepub fn compress_unchecked(
&self,
array: &ArrayData,
ctx: &SamplingCompressor<'a>,
) -> VortexResult<CompressedArray<'a>>
pub fn compress_unchecked( &self, array: &ArrayData, ctx: &SamplingCompressor<'a>, ) -> VortexResult<CompressedArray<'a>>
Compresses array with our compressor without verifying that the compressor can compress this array
pub fn compress( &self, array: &ArrayData, ctx: &SamplingCompressor<'a>, ) -> Option<VortexResult<CompressedArray<'a>>>
pub fn compressor(&self) -> &dyn EncodingCompressor
sourcepub fn metadata(&mut self) -> Option<Arc<dyn EncoderMetadata>>
pub fn metadata(&mut self) -> Option<Arc<dyn EncoderMetadata>>
Access the saved opaque metadata.
This will consume the owned metadata, giving the caller ownership of the Box.
The value of T
will almost always be EncodingCompressor
-specific.
pub fn into_parts( self, ) -> (&'a dyn EncodingCompressor, Vec<Option<CompressionTree<'a>>>, Option<Arc<dyn EncoderMetadata>>)
Trait Implementations§
source§impl<'a> Clone for CompressionTree<'a>
impl<'a> Clone for CompressionTree<'a>
source§fn clone(&self) -> CompressionTree<'a>
fn clone(&self) -> CompressionTree<'a>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for CompressionTree<'_>
impl Debug for CompressionTree<'_>
Auto Trait Implementations§
impl<'a> Freeze for CompressionTree<'a>
impl<'a> !RefUnwindSafe for CompressionTree<'a>
impl<'a> !Send for CompressionTree<'a>
impl<'a> !Sync for CompressionTree<'a>
impl<'a> Unpin for CompressionTree<'a>
impl<'a> !UnwindSafe for CompressionTree<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more