Skip to main content

to_bytes

Function to_bytes 

Source
pub fn to_bytes(v: &Value) -> DogeResult
Expand description

bytes(x) — raw bytes from a value. A Str is UTF-8 encoded; a List of Ints becomes those bytes, each of which must be in 0..=255 (a catchable ValueError otherwise); a Bytes is returned unchanged. Any other type is a catchable TypeError.