pub unsafe trait Destination {
type Output;
// Required methods
fn capacity(&self) -> usize;
fn as_mut_ptr(&mut self) -> *mut u8;
unsafe fn finish(self, size: usize) -> Self::Output;
}Expand description
Destination buffer usable as a compression and decompression target.
§Safety
The as_mut_ptr method must return a valid pointer to a start of a possibly uninitialized
but valid to write to slice with a minimum size of Self::capacity(). The return value of the
capacity function therefore also has to be accurate in order to prevent out of memory writes.
Even though the finish method is expected to be called at some point but cannot be relied on.