Expand description
This crate provides a DynamicBuffer struct that allows to easily share a pointer to u8 with
C APIs and free that pointer properly by carrying a destructor_callback. In that regard it is
carrying a very barebone vtable so that freeing the memory pointed to by the DynamicBuffer
is easy either on the C or Rust side.
A From implementation is provided to convert a Vec of u8 into a DynamicBuffer easily,
the destructor being populated automatically.
A DynamicBufferView is also provided to indicate that the struct does not own the data and
is merely used to share data in a read-only way.
Structs§
Functions§
- destroy_
dynamic_ ⚠buffer - C API to destroy a
DynamicBuffer.