Skip to main content

Module convert

Module convert 

Source
Expand description

prost schema::PointPointDesc conversion (alloc). The codec core is heap-free, so descriptors borrow: strings and allowed_values borrow the prost message directly; flag/field/case/na tables need owned side-buffers (DescBufs) because their layout differs from the wire form. Two-step use:

let bufs = desc_bufs(point);
let desc = point_desc(point, block.space(), &bufs);

Kind/precedence decisions mirror go/codec and moddef-ts decodePoint: composed > flags > fields > string/bytes > primitive (default: raw enum integer, signed if the storage is).

Structs§

DescBufs
Owned side-tables backing one PointDesc view. Strings inside borrow the prost message, so this lives exactly as long as the borrow chain.

Functions§

desc_bufs
Build the side-buffers for p (step 1 of 2).
point_desc
Build the descriptor view for p (step 2 of 2). block_space is the owning block’s address space, used when the mapping leaves it unspecified.
point_words
Register count to read/write for p (mapping length or storage default).