pub fn apply<H: WorkerProtocolHandler>(
code: u32,
body: &[u8],
handler: &H,
) -> Result<DispatchOutcome, SpecError>Expand description
Dispatch one wire-arriving opcode against a handler. Looks up
the opcode by code in the canonical catalog, then routes to
handler.dispatch.
§Errors
unknown-opcodeifcodedoesn’t appear in the canonical opcode set.dispatch-failedif the handler returns an error.