Expand description
Type conversions between C ABI types and Rust types
These functions provide safe wrappers around unsafe FFI operations.
Structs§
Functions§
- audio_
format_ from_ c - Convert C AudioFormat to Rust
- audio_
format_ to_ c - Convert Rust AudioFormat to C
- c_
str_ ⚠to_ string - Convert C string to Rust String
- error_
to_ c - Convert an error message to a C string for returning across the C ABI.
- free_
c_ ⚠string - Free a C string created by
string_to_c. - packet_
from_ ⚠c - Convert C packet to Rust Packet
- packet_
to_ c - Convert Rust Packet to C representation.
- packet_
type_ from_ c - Convert C packet type info to Rust PacketType
- packet_
type_ to_ c - Convert Rust PacketType to C representation Returns (CPacketTypeInfo, optional CAudioFormat that must be kept alive) For RawAudio types, the returned CAudioFormat must outlive the CPacketTypeInfo
- sample_
format_ from_ c - Convert C sample format to Rust
- sample_
format_ to_ c - Convert Rust SampleFormat to C
- string_
to_ c - Convert Rust string to C string (caller must free)