Struct DecoderDictionary
pub struct DecoderDictionary<'a> { /* private fields */ }Expand description
Prepared dictionary for decompression
Implementations§
§impl DecoderDictionary<'static>
impl DecoderDictionary<'static>
pub fn copy(dictionary: &[u8]) -> DecoderDictionary<'static>
pub fn copy(dictionary: &[u8]) -> DecoderDictionary<'static>
Create a prepared dictionary for decompression.
This will copy the dictionary internally.
§Panics
If zstd cannot load the dictionary - for instance, it starts with the
dictionary magic number but its header is corrupt. Use
DecoderDictionary::try_copy for a dictionary you did not make
yourself.
pub fn try_copy(dictionary: &[u8]) -> Result<DecoderDictionary<'static>, Error>
pub fn try_copy(dictionary: &[u8]) -> Result<DecoderDictionary<'static>, Error>
Create a prepared dictionary for decompression, or an error if zstd cannot load it.
This will copy the dictionary internally.
§impl<'a> DecoderDictionary<'a>
impl<'a> DecoderDictionary<'a>
pub fn new(dict: &'a [u8]) -> DecoderDictionary<'a>
Available on crate feature experimental only.
pub fn new(dict: &'a [u8]) -> DecoderDictionary<'a>
experimental only.Create prepared dictionary for decompression
Only available with the experimental feature. Use DecoderDictionary::copy otherwise.
§Panics
If zstd cannot load the dictionary. Use DecoderDictionary::try_new
for a dictionary you did not make yourself.
pub fn try_new(dict: &'a [u8]) -> Result<DecoderDictionary<'a>, Error>
Available on crate feature experimental only.
pub fn try_new(dict: &'a [u8]) -> Result<DecoderDictionary<'a>, Error>
experimental only.Create prepared dictionary for decompression, or an error if zstd cannot load it.
Only available with the experimental feature. Use
DecoderDictionary::try_copy otherwise.
pub fn as_ddict(&self) -> &DDict<'a>
pub fn as_ddict(&self) -> &DDict<'a>
Returns reference to DDict inner object
Auto Trait Implementations§
impl<'a> Freeze for DecoderDictionary<'a>
impl<'a> RefUnwindSafe for DecoderDictionary<'a>
impl<'a> Send for DecoderDictionary<'a>
impl<'a> Sync for DecoderDictionary<'a>
impl<'a> Unpin for DecoderDictionary<'a>
impl<'a> UnsafeUnpin for DecoderDictionary<'a>
impl<'a> UnwindSafe for DecoderDictionary<'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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 8 bytes