A deferred execution marker.
When a handler or test double returns %DoubleDown.Contract.Dispatch.Defer{fun: fun},
the dispatch system releases the NimbleOwnership lock before calling
fun.(). This avoids deadlocks when the deferred function makes
further dispatched calls (e.g. transact calling insert inside
its body).
For users of the Double API, prefer DoubleDown.Double.defer/1
over constructing this struct directly.
Used internally by Repo.Stub, Repo.OpenInMemory, and
DoubleDown.Double's canonical handler.
Summary
Types
@type t() :: %DoubleDown.Contract.Dispatch.Defer{fun: (-> term())}