Skip to main content

encode_bytes

Function encode_bytes 

Source
pub fn encode_bytes(
    catalog: &Catalog,
    ty: &Type,
    value: &Value,
) -> Result<Vec<u8>, EncodeError>
Expand description

Returns the encoding of value, of type ty.

§Errors

A value that does not have the type, and a type with no encoding, such as a function’s or a task’s, are EncodeErrors; a checked program reaches neither.