rust: Document read_callback_t and write_callback_t

This commit is contained in:
Jack Grigg 2021-06-11 23:03:26 +01:00
parent 88b3c377d1
commit 36874e7f07
1 changed files with 2 additions and 0 deletions

View File

@ -11,7 +11,9 @@
extern "C" { extern "C" {
#endif #endif
/// The type that Rust expects for its `CppStreamReader` callback.
typedef long (*read_callback_t)(void* context, unsigned char* pch, size_t nSize); typedef long (*read_callback_t)(void* context, unsigned char* pch, size_t nSize);
/// The type that Rust expects for its `CppStreamWriter` callback.
typedef long (*write_callback_t)(void* context, const unsigned char* pch, size_t nSize); typedef long (*write_callback_t)(void* context, const unsigned char* pch, size_t nSize);
#ifdef __cplusplus #ifdef __cplusplus