Skip to main content

bytes_from_value

Function bytes_from_value 

Source
pub fn bytes_from_value(value: &RuntimeValue) -> Result<Vec<u8>, String>
Expand description

Read a patch buffer out of a LOGOS value — a Seq of Int whose every element is a byte.

A value OUTSIDE a byte’s range is refused rather than truncated to its low 8 bits: a wrong number silently becoming a different, valid-looking operation is exactly the class of bug a binary format invites, and it would show up as a mangled page rather than as an error.