Expand description
FFI string utilities
Helper functions for retrieving strings from C/Objective-C APIs that use buffer-based string retrieval patterns.
Constants§
- DEFAULT_
BUFFER_ SIZE - Default buffer size for FFI string retrieval
- SMALL_
BUFFER_ SIZE - Smaller buffer size for short strings (e.g., device IDs, stream names)
Functions§
- ffi_
string_ ⚠from_ buffer - Retrieves a string from an FFI function that writes to a buffer.
- ffi_
string_ ⚠from_ buffer_ or_ empty - Same as
ffi_string_from_bufferbut returns an empty string on failure instead ofNone. - ffi_
string_ ⚠owned - Retrieves a string from an FFI function that returns an owned C string pointer.
- ffi_
string_ ⚠owned_ or_ empty - Same as
ffi_string_ownedbut returns an empty string on failure. - take_
owned_ ⚠cstring - Take ownership of an already-obtained Swift/Objective-C C string pointer
and free the source via
free_fn. - take_
owned_ ⚠cstring_ c - Same as
take_owned_cstringbut for*mut std::ffi::c_char.