Function tycho::unmarshall_vec[][src]

pub fn unmarshall_vec(data: Vec<u8>) -> TychoResult<Element>

Unmarshall an element from a vec of bytes.

Example

use tycho::unmarshall_vec;

// Example bytes
let bytes = vec![1, 4, 2, 1, 164];

// Unmarshall bytes into vec.
let data = unmarshall_vec(bytes).unwrap();

assert_eq!(data, Value(Number(Unsigned16(420))))