Skip to main content

encode_invocation_payload

Function encode_invocation_payload 

Source
pub fn encode_invocation_payload<I, T, R>(
    value: &T,
    route_idx: u8,
    f: impl FnOnce(&[u8]) -> R,
) -> R
where I: InvocationIo, T: Encode,
Expand description

SCALE-encode a reply payload prefixed with the Sails header derived from I, passing the encoded bytes to the caller’s closure.