Handler meta for a stateful (4/5-arity) function handler.
The :state field holds the mutable handler state directly —
for raw set_stateful_handler this is user-provided state,
for Double-managed handlers it is a CanonicalHandlerState struct.
Summary
Functions
Create a new Stateful handler meta. Validates that fun is a 4 or 5-arity function.
Replace the state within a Stateful handler meta.
Update the state within a Stateful handler meta via a function.
Types
@type t() :: %DoubleDown.Dispatch.HandlerMeta.Stateful{ fun: DoubleDown.Dispatch.Types.stateful_fun(), state: term() }
Functions
@spec new(DoubleDown.Dispatch.Types.stateful_fun(), term()) :: t()
Create a new Stateful handler meta. Validates that fun is a 4 or 5-arity function.
Replace the state within a Stateful handler meta.
Update the state within a Stateful handler meta via a function.