pub struct DataCompression { /* private fields */ }Expand description
Data compression
Implementations§
Source§impl DataCompression
impl DataCompression
pub fn new() -> Self
pub fn initialize(&mut self) -> Result<(), PhysicsError>
Sourcepub fn add_compression_algorithm(
&mut self,
name: &str,
algo: CompressionAlgorithm,
)
pub fn add_compression_algorithm( &mut self, name: &str, algo: CompressionAlgorithm, )
Register a compression algorithm under the given name.
Sourcepub fn get_compression_algorithm(
&self,
name: &str,
) -> Option<&CompressionAlgorithm>
pub fn get_compression_algorithm( &self, name: &str, ) -> Option<&CompressionAlgorithm>
Get a compression algorithm by name, if any.
Sourcepub fn list_compression_algorithms(&self) -> Vec<String>
pub fn list_compression_algorithms(&self) -> Vec<String>
List all registered compression algorithm names.
Sourcepub fn get_compression_ratio(&self) -> &CompressionRatio
pub fn get_compression_ratio(&self) -> &CompressionRatio
Get a reference to the compression ratio.
Sourcepub fn get_compression_ratio_mut(&mut self) -> &mut CompressionRatio
pub fn get_compression_ratio_mut(&mut self) -> &mut CompressionRatio
Get a mutable reference to the compression ratio.
Sourcepub fn get_compression_performance(&self) -> &CompressionPerformance
pub fn get_compression_performance(&self) -> &CompressionPerformance
Get a reference to the compression performance.
Sourcepub fn get_compression_performance_mut(&mut self) -> &mut CompressionPerformance
pub fn get_compression_performance_mut(&mut self) -> &mut CompressionPerformance
Get a mutable reference to the compression performance.
Auto Trait Implementations§
impl Freeze for DataCompression
impl RefUnwindSafe for DataCompression
impl Send for DataCompression
impl Sync for DataCompression
impl Unpin for DataCompression
impl UnsafeUnpin for DataCompression
impl UnwindSafe for DataCompression
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
§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