Expand description
C ABI for the predsync engine.
All entry points use opaque handles, caller-provided buffers and explicit lengths. No function allocates a string or list on the caller’s behalf, and every entry point converts a panic into a status code.
Macros§
- ffi_try
- Return an error status from a fallible helper inside a generated glue function.
Structs§
- Demo
Telemetry - Predsync
Decoded - Opaque handle to one fully decoded frame.
- Predsync
Decoder - Opaque handle to one incoming stream decoder.
- Predsync
Encode Info - Counts from one successful encode.
- Predsync
Encoder - Opaque handle to one message encoder.
- Predsync
Registry - Opaque handle to an explicit runtime predictor registry.
- Predsync
Set - Opaque handle to a validated schema set.
- Predsync
Value - One value crossing the C boundary.
Enums§
- Demo
Telemetry Mode - Predsync
Decode Error Kind - The named decoder failure behind
PredsyncStatus::DecodeError. - Predsync
Scalar Kind - The schema scalar carried by a
PredsyncValue. - Predsync
Status - Status returned by every C entry point.
- Predsync
Validity - The trust state of a decoded field.
- Predsync
Value Kind - Which representation a
PredsyncValuecarries.
Functions§
- demo_
telemetry_ ⚠pack - Safety
- demo_
telemetry_ ⚠unpack - Safety
- predsync_
decode_ ⚠feed - Feed one frame to a decoder and return an owned decoded-frame handle.
- predsync_
decoded_ ⚠field - Copy one decoded field into a caller-provided value buffer.
- predsync_
decoded_ ⚠field_ count - Return the number of decoded fields.
- predsync_
decoded_ ⚠free - Free a decoded-frame handle.
- predsync_
decoded_ ⚠info - Read the message index, missed-frame count and resync flag from a decoded frame.
- predsync_
decoder_ ⚠free - Free a decoder handle.
- predsync_
decoder_ ⚠new - Construct a decoder for one incoming stream.
- predsync_
decoder_ ⚠new_ with_ registry - Construct a decoder using an explicit runtime registry.
- predsync_
encode ⚠ - Encode one frame into a caller-provided buffer.
- predsync_
encoder_ ⚠free - Free an encoder handle.
- predsync_
encoder_ ⚠new - Construct an encoder for one message in a schema set.
- predsync_
encoder_ ⚠new_ with_ registry - Construct an encoder using an explicit runtime registry.
- predsync_
registry_ ⚠free - Free a predictor registry.
- predsync_
registry_ new - Create an empty explicit predictor registry.
- predsync_
registry_ ⚠register_ model - Register a C callback custom predictor model in an explicit registry.
- predsync_
set_ ⚠free - Free a schema-set handle.
- predsync_
set_ ⚠from_ yaml - Parse a schema set from UTF-8 YAML and return an owned opaque handle.
- read_
bits - Borrow the slot bits of a scalar value.
- read_
list - Borrow the slot bits of a list value.
- read_
str - Borrow the UTF-8 bytes of a string value.
- value_
list_ ⚠into - Write list slot bits into a caller-provided scratch buffer and describe them
with
out. The library never allocates a buffer for generated wrappers. - value_
scalar - Build a scalar value from slot bits.
- value_
str - Build a borrowed string value.
Type Aliases§
- Predsync
Model Predict - Predsync
Model Reset - C callback signature for a runtime custom predictor model.
- Predsync
Model State Hash - Predsync
Model Update