Skip to main content

Crate predsync_ffi

Crate predsync_ffi 

Source
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§

DemoTelemetry
PredsyncDecoded
Opaque handle to one fully decoded frame.
PredsyncDecoder
Opaque handle to one incoming stream decoder.
PredsyncEncodeInfo
Counts from one successful encode.
PredsyncEncoder
Opaque handle to one message encoder.
PredsyncRegistry
Opaque handle to an explicit runtime predictor registry.
PredsyncSet
Opaque handle to a validated schema set.
PredsyncValue
One value crossing the C boundary.

Enums§

DemoTelemetryMode
PredsyncDecodeErrorKind
The named decoder failure behind PredsyncStatus::DecodeError.
PredsyncScalarKind
The schema scalar carried by a PredsyncValue.
PredsyncStatus
Status returned by every C entry point.
PredsyncValidity
The trust state of a decoded field.
PredsyncValueKind
Which representation a PredsyncValue carries.

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§

PredsyncModelPredict
PredsyncModelReset
C callback signature for a runtime custom predictor model.
PredsyncModelStateHash
PredsyncModelUpdate