Skip to main content

Module keys

Module keys 

Source
Expand description

Compile-time Field keys, one per native field, read with ctx.context(key).

Each key is a zero-sized selector implementing Field only for the context types that carry its field, so applying a key to the wrong transport’s context is a compile error. A key that also implements ContextField can be bound as a Ctx<K> handler parameter; those read the per-delivery context, so a batch body reaches its own fields through ctx.context(..) instead.

Structs§

Channel
Reads the concrete channel off a PubSubContext.
ConsumerGroup
Reads the consumer group off a stream context, per delivery or per batch.
EntryId
Reads the stream entry id this delivery was read at off a StreamContext.
FredPool
Reads the broker’s connection pool, fred::clients::Pool, off the context of any subscription.
FromPattern
Reads whether a PubSubContext delivery matched through a PSUBSCRIBE pattern.
Pipeline
Reads the delivery’s round off the context of a .pipeline() subscription: the RedisPipeline its handler queues commands into.
Position
Reads the group cursor that redelivers this entry off a StreamContext.
SeekHandle
Reads the group’s reposition handle off a stream context, per delivery or per batch.