pub struct Interface { /* private fields */ }
Expand description
Decoder interface
Implementations§
source§impl Interface
impl Interface
sourcepub fn brotli_rust() -> Decoder
pub fn brotli_rust() -> Decoder
Creates decoder with brotli-rust
interface
Panics on OOM issues
source§impl Interface
impl Interface
sourcepub fn zstd(opts: ZstdOptions) -> Option<Decoder>
pub fn zstd(opts: ZstdOptions) -> Option<Decoder>
Creates decoder with zstd
interface
Returns None
if unable to initialize it (likely due to lack of memory)
source§impl Interface
impl Interface
sourcepub const fn new(
decode_fn: unsafe fn(_: NonNull<u8>, _: *const u8, _: usize, _: *mut u8, _: usize) -> Decode,
reset_fn: fn(_: NonNull<u8>) -> Option<NonNull<u8>>,
drop_fn: fn(_: NonNull<u8>),
describe_error_fn: fn(_: i32) -> Option<&'static str>
) -> Self
pub const fn new( decode_fn: unsafe fn(_: NonNull<u8>, _: *const u8, _: usize, _: *mut u8, _: usize) -> Decode, reset_fn: fn(_: NonNull<u8>) -> Option<NonNull<u8>>, drop_fn: fn(_: NonNull<u8>), describe_error_fn: fn(_: i32) -> Option<&'static str> ) -> Self
Creates new Interface
with provided functions to build vtable.
First argument of every function is state as pointer.
It is user responsibility to pass correct function pointers
Auto Trait Implementations§
impl Freeze for Interface
impl RefUnwindSafe for Interface
impl Send for Interface
impl Sync for Interface
impl Unpin for Interface
impl UnwindSafe for Interface
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