Trait Decompress

Source
pub trait Decompress<Decompressed, Ctx>
where Ctx: ContextError,
{ // Required method async fn decompress(self, ctx: &Ctx) -> Result<Decompressed, Ctx::Error>; }
Expand description

The trait allows for decompression of a compressed type. This trait is syntax sugar for DecompressibleBy with the compressed type as the receiver.

Required Methods§

Source

async fn decompress(self, ctx: &Ctx) -> Result<Decompressed, Ctx::Error>

Perform decompression, returning the original data.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T, Ctx, Decompressed> Decompress<Decompressed, Ctx> for T
where Ctx: ContextError, Decompressed: DecompressibleBy<Ctx, Compressed = Self>,