Skip to main content

value_reply

Function value_reply 

Source
pub fn value_reply(value: &[u8], ts: Stamp) -> Payload
Expand description

Slice a RawValue’s verbatim JSON bytes back out into an owned Payload; a missing field decodes as the JSON literal null. The AimX 4.0 reply to record.get: {"value":<value>,"ts":<ns>}, with value the record’s already-encoded JSON, spliced verbatim.

Two allocations: the reply is assembled in an exactly sized buffer, then moved into the shared Payload; the stamp is formatted on the stack.