Struct CDict
pub struct CDict<'a>(/* private field */, /* private field */);
Compression dictionary.
Implementations
impl CDict<'static>
fn create(dict_buffer: &[u8], compression_level: CompressionLevel) -> SelfPrepare a dictionary to compress data.
This will make it easier for compression contexts to load this dictionary.
The dictionary content will be copied internally, and does not need to be kept around.
Panics
If loading this dictionary failed.
fn try_create(dict_buffer: &[u8], compression_level: CompressionLevel) -> Option<Self>Prepare a dictionary to compress data.
This will make it easier for compression contexts to load this dictionary.
The dictionary content will be copied internally, and does not need to be kept around.
impl<'a> CDict<'a>
fn sizeof(&self) -> usizeReturns the current memory usage of this dictionary.
Note that this may change over time.
fn get_dict_id(&self) -> Option<NonZeroU32>Returns the dictionary ID for this dict.
Returns
Noneif this dictionary is empty or invalid.
Trait Implementations
impl<'a> Drop for CDict<'a>
fn drop(&mut self)
impl<'a> Send for CDict<'a>
impl<'a> Sync for CDict<'a>
Auto Trait Implementations
impl<'a> Freeze for CDict<'a>
impl<'a> RefUnwindSafe for CDict<'a>
impl<'a> Unpin for CDict<'a>
impl<'a> UnsafeUnpin for CDict<'a>
impl<'a> UnwindSafe for CDict<'a>
Blanket Implementations
impl<T> Any for CDict<'a>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for CDict<'a>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for CDict<'a>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> From<T> for CDict<'a>
fn from(t: T) -> TReturns the argument unchanged.
impl<T, U> Into<U> for CDict<'a>
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for CDict<'a>
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for CDict<'a>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>