pub struct SchemaCompressor { /* private fields */ }
Expand description
Schema-aware compressor
Implementations§
Source§impl SchemaCompressor
impl SchemaCompressor
Sourcepub fn with_strategy(strategy: CompressionStrategy) -> Self
pub fn with_strategy(strategy: CompressionStrategy) -> Self
Create compressor with specific strategy
Sourcepub fn with_config(config: CompressionConfig) -> Self
pub fn with_config(config: CompressionConfig) -> Self
Create compressor with custom configuration
Sourcepub fn analyze_and_optimize(
&mut self,
data: &JsonValue,
) -> DomainResult<&CompressionStrategy>
pub fn analyze_and_optimize( &mut self, data: &JsonValue, ) -> DomainResult<&CompressionStrategy>
Analyze data and update compression strategy
Sourcepub fn compress(&self, data: &JsonValue) -> DomainResult<CompressedData>
pub fn compress(&self, data: &JsonValue) -> DomainResult<CompressedData>
Compress JSON data according to current strategy
Trait Implementations§
Source§impl Clone for SchemaCompressor
impl Clone for SchemaCompressor
Source§fn clone(&self) -> SchemaCompressor
fn clone(&self) -> SchemaCompressor
Returns a duplicate 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 SchemaCompressor
impl Debug for SchemaCompressor
Auto Trait Implementations§
impl Freeze for SchemaCompressor
impl RefUnwindSafe for SchemaCompressor
impl Send for SchemaCompressor
impl Sync for SchemaCompressor
impl Unpin for SchemaCompressor
impl UnwindSafe for SchemaCompressor
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