[][src]Function urbit_q::encode

pub fn encode(input: &[u8]) -> String

Encodes data to Urbit's @q format

Note that it pads the beginning to an even number of bytes (as per the original implementation, urbit-ob), e.g.

let bytes: [u8; 3] = [1, 2, 3];
let string = encode(&bytes); // doznec-binwes
decode(&string).unwrap(); // [0, 1, 2, 3]