Function tycho::marshall_vec [−][src]
pub fn marshall_vec<E: Into<Element>>(element: E) -> TychoResult<Vec<u8>>
Marshall an element into a vec of bytes.
Example
use tycho::{Element::Value, Value::Char, marshall_vec}; // Create a char value. let data = Value(Char('@')); // marshall the value into a vec. let bytes = marshall_vec(data).unwrap(); assert_eq!(bytes, vec![1, 3, 64]);