Expand description
#[repr(C)] POD types shared by the FFI (by layout) and the pipe wire
(by explicit little-endian serialization in fmf-proto).
The const
blocks pin every size and offset at cargo check time — the same pins
fmf-ffi’s contract_tests re-assert at run time as an independent
tripwire, and gen-contract radiates to C# [FieldOffset] values.
Structs§
- FmfBlob
- Engine-allocated UTF-8 JSON payload (stats, query traces); release with
fmf_blob_free. - FmfEvent
- POD event payload — FFI callback argument and pipe event-push body
(32 bytes).
volumeis the zero-padded UTF-8 drive label (“C:”). - FmfPage
- FFI page: one contiguous engine-allocated block (row array + string blob). Pointers, so FFI-only — the pipe sends rows and blob inline.
- FmfQuery
Options - Query options — 20 bytes, no padding, LE on the wire. Field values are
the
crate::optionsenums as u32. - FmfRow
- 48-byte result row, no internal padding. Offsets index into the page’s
trailing string blob (WTF-8). Mirrored by C#
LayoutKind.Explicit. - FmfVolume
Status - FFI volume status.
stateiscrate::options::VolumeStateas u32. - Frame
Header - 16-byte little-endian pipe frame header.
to_bytes/from_bytesare pure byte conversions — theMAX_PAYLOAD_LENpolicy lives in fmf-proto’sdecode_header/read_frame.