DoubleDown.Contract.Dispatch.HandlerMeta (double_down v0.58.0)

Copy Markdown View Source

Structs describing the three handler types that can be installed for a contract via DoubleDown.Testing.

Stored in NimbleOwnership under the contract module atom as key. DoubleDown.Contract.Dispatch.invoke_handler/5 pattern-matches on the struct to select the dispatch strategy.

Variants

  • HandlerMeta.Module — delegate to a module implementing the contract behaviour
  • HandlerMeta.Stateless — dispatch via a 3-arity fn contract, operation, args -> result end
  • HandlerMeta.Stateful — dispatch via a 4/5-arity stateful function with mutable state stored inline in the :state field