pub(crate) struct Poison(pub(crate) Option<ErrorCode>);Expand description
Remembers an error that may have left a context in a state zstd considers undefined.
zstd.h says of both ZSTD_compressStream2() and ZSTD_decompressStream()
that “if an operation ends with an error, it may leave [the context] in an
undefined state”, and that calling them again on such a state is undefined
behaviour - the context has to be reset first. So once a streaming
operation fails, refuse to run another one until something resets the
context, and hand the original error back instead.
Tuple Fields§
§0: Option<ErrorCode>Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Poison
impl RefUnwindSafe for Poison
impl Send for Poison
impl Sync for Poison
impl Unpin for Poison
impl UnsafeUnpin for Poison
impl UnwindSafe for Poison
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