Skip to main content

Module keys

Module keys 

Source
Expand description

What a handler reads off the delivery it handles, through Ctx<Key>. What a handler reads off the delivery it handles, through Ctx<Key>.

A handler’s first Ctx names its context: Tx reads TxContext, which a transactional delivery lends; Pool reads PoolContext, which every delivery of an InboxQueue subscription lends; Attempt reads InboxContext, which any delivery lends. A key after the first reads any context that carries it, so a handler takes them in the order Tx, then Pool, then Attempt, and leaves out the ones it does not need.

Structs§

Attempt
The delivery’s attempt, 1 for the first delivery: the row’s attempt as it stood before the claim; None for a table without one.
InboxContext
A delivery’s context: what the inbox lends a handler besides the message.
Pool
The pool a handler queries through: writes through it commit on their own, whatever the delivery’s outcome.
PoolContext
What every delivery of an InboxQueue subscription on DB lends: the context Ctx<keys::Pool<DB>> reads, and Ctx<keys::Attempt> after it.
Tx
The delivery’s transaction: the handler’s first Ctx, on a registration mounted with .transactional().
TxContext
What a transactional delivery on DB lends its handler: the context Ctx<keys::Tx<DB>> reads, and Ctx<keys::Pool<DB>> and Ctx<keys::Attempt> after it.