pub fn decode<T: AsRef<[u8]>>(val: T) -> Result<Vec<u8>, ConversionError>