pub struct DDict<'a>(pub(crate) NonNull<ZSTD_DDict_s>, pub(crate) PhantomData<&'a ()>);Expand description
A digested decompression dictionary.
Tuple Fields§
§0: NonNull<ZSTD_DDict_s>§1: PhantomData<&'a ()>Implementations§
Source§impl DDict<'static>
impl DDict<'static>
Sourcepub fn create(dict_buffer: &[u8]) -> DDict<'static>
pub fn create(dict_buffer: &[u8]) -> DDict<'static>
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.
Sourcepub fn try_create(dict_buffer: &[u8]) -> Option<DDict<'static>>
pub fn try_create(dict_buffer: &[u8]) -> Option<DDict<'static>>
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.
Trait Implementations§
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§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more