Struct DDict

pub struct DDict<'a>(/* private field */, /* private field */);

A digested decompression dictionary.

Implementations

impl DDict<'static>

fn create(dict_buffer: &[u8]) -> Self

Prepare a dictionary to decompress data.

The dictionary content will be copied internally, and does not need to be kept around.

Panics

If loading this dictionary failed. See DDict::try_create.

fn try_create(dict_buffer: &[u8]) -> Option<Self>

Prepare a dictionary to decompress data.

The dictionary content will be copied internally, and does not need to be kept around. Returns None if zstd could not load the dictionary, for instance because it starts with the dictionary magic number but its header is corrupt.

impl<'a> DDict<'a>

fn sizeof(&self) -> usize
fn get_dict_id(&self) -> Option<NonZeroU32>

Returns the dictionary ID for this dict.

Returns None if this dictionary is empty or invalid.

Trait Implementations

impl<'a> Drop for DDict<'a>

fn drop(&mut self)

impl<'a> Send for DDict<'a>

impl<'a> Sync for DDict<'a>

Auto Trait Implementations

impl<'a> Freeze for DDict<'a>

impl<'a> RefUnwindSafe for DDict<'a>

impl<'a> Unpin for DDict<'a>

impl<'a> UnsafeUnpin for DDict<'a>

impl<'a> UnwindSafe for DDict<'a>

Blanket Implementations

impl<T> Any for DDict<'a> where T: 'static + ?Sized,

impl<T> Borrow<T> for DDict<'a> where T: ?Sized,

impl<T> BorrowMut<T> for DDict<'a> where T: ?Sized,

impl<T> From<T> for DDict<'a>

impl<T, U> Into<U> for DDict<'a> where U: From<T>,

impl<T, U> TryFrom<U> for DDict<'a> where U: Into<T>,

impl<T, U> TryInto<U> for DDict<'a> where U: TryFrom<T>,