Skip to main content

as_bytes

Function as_bytes 

Source
fn as_bytes(value: &Value) -> Option<Vec<u8>>
Expand description

Read a byte string, unwrapping the typed-array tag some encoders add.

A byte string may arrive plain or wrapped in tag 64, and one of the two implementations of this format wraps every one it writes. Reading only the plain form meant every payload-bearing field that encoder produced — raw wire bytes, object payloads, track names, trace ids — read as absent, and a payload-bearing field that reads as absent is indistinguishable from one the recorder chose not to capture.