PTWM
chain

ptwm_core::chain::dispatch

Op dispatch: construct a Box<dyn Op> from an OpId and its raw params.

ptwm_core::chain::dispatch

Op dispatch: construct a Box<dyn Op> from an OpId and its raw params.

rsmod

ptwm_core::chain::dispatch

crates/ptwm-core/src/chain/dispatch.rs:1
mod dispatch

Op dispatch: construct a `Box<dyn Op>` from an `OpId` and its raw params.

Inverse of `Op::write_params` — decodes the params bytes each op wrote and instantiates the concrete struct.
rsfn

ptwm_core::chain::dispatch::op_from_id

crates/ptwm-core/src/chain/dispatch.rs:22
pub fn op_from_id(id: OpId, params: &[u8]) -> Result<Box<dyn ?>, PtwmCoreError>

Instantiate a `Box<dyn Op>` from `id` and the op's encoded `params` bytes.

`params` must hold exactly the bytes the op's `write_params` would emit — no opcode prefix, no length prefix.