pub trait ContextCompressor: Send + Sync {
// Required method
fn compress(
&self,
input: CompressionInput,
) -> Pin<Box<dyn Future<Output = Result<CompressionOutput, ReactError>> + Send + '_>>;
}Expand description
Unified interface for all compression strategies (async, supports dyn trait object)
Required Methods§
fn compress( &self, input: CompressionInput, ) -> Pin<Box<dyn Future<Output = Result<CompressionOutput, ReactError>> + Send + '_>>
Trait Implementations§
Source§impl ContextCompressor for Box<dyn ContextCompressor>
Allows Box<dyn ContextCompressor> to be passed directly to any function accepting
impl ContextCompressor, without introducing an extra wrapper enum.
impl ContextCompressor for Box<dyn ContextCompressor>
Allows Box<dyn ContextCompressor> to be passed directly to any function accepting
impl ContextCompressor, without introducing an extra wrapper enum.
fn compress( &self, input: CompressionInput, ) -> Pin<Box<dyn Future<Output = Result<CompressionOutput, ReactError>> + Send + '_>>
Implementations on Foreign Types§
Source§impl ContextCompressor for Box<dyn ContextCompressor>
Allows Box<dyn ContextCompressor> to be passed directly to any function accepting
impl ContextCompressor, without introducing an extra wrapper enum.
impl ContextCompressor for Box<dyn ContextCompressor>
Allows Box<dyn ContextCompressor> to be passed directly to any function accepting
impl ContextCompressor, without introducing an extra wrapper enum.