Skip to main content

byte_get

Function byte_get 

Source
pub fn byte_get(recv: &Value, index: &str) -> Value
Expand description

buf[i] — the byte at an integer index, or undefined past the end.

Reads through to the single element. Materialising the whole buffer here (the old bytes_of call) made one indexed read O(len), so any loop over a Buffer — including a request body arriving through express.json() — cost O(len^2).