Skip to main content

decode

Function decode 

Source
pub fn decode<T: DeserializeOwned>(body: &[u8]) -> Result<T, WireError>
Expand description

Decode one frame body into T, refusing everything ADR 0001 requires.

The error code says which wall was hit: KernelErrorCode::Schema for bytes that are not the shape the contract declares, and KernelErrorCode::Validation for a value the contract’s own types refuse. Both are values a client can branch on, never a dropped connection.