Skip to main content

serialize_image

Function serialize_image 

Source
pub fn serialize_image(
    image: &ProgramImage,
    functions: Option<&FunctionTable>,
) -> Result<Vec<u8>, String>
Expand description

Serializes a ProgramImage to .cdlb bytes (magic + version + body), followed by the function table when there is one.

ยงErrors

Returns the serialization error as a string if the postcard body cannot be encoded.