ba2

Trait CompressableFrom

Source
pub trait CompressableFrom<T>: Sealed {
    // Required methods
    fn from_compressed(value: T, decompressed_len: usize) -> Self;
    fn from_decompressed(value: T) -> Self;
}
Expand description

A trait that creates an optionally compressed container using the given value.

Required Methods§

Source

fn from_compressed(value: T, decompressed_len: usize) -> Self

Makes a compressed instance of Self using the given data.

Source

fn from_decompressed(value: T) -> Self

Makes a decompressed instance of Self using the given 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 CompressableFrom<Box<[u8]>> for Chunk<'static>

Source§

impl CompressableFrom<Box<[u8]>> for File<'static>

Source§

impl<'bytes> CompressableFrom<&'bytes [u8]> for Chunk<'bytes>

Source§

impl<'bytes> CompressableFrom<&'bytes [u8]> for File<'bytes>

Source§

impl<'bytes, const N: usize> CompressableFrom<&'bytes [u8; N]> for Chunk<'bytes>

Source§

impl<'bytes, const N: usize> CompressableFrom<&'bytes [u8; N]> for File<'bytes>