Trait ba2::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.

Object Safety§

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>