Skip to main content

PubSubLookupFn

Type Alias PubSubLookupFn 

Source
pub type PubSubLookupFn = Arc<dyn Fn(&str) -> Option<Arc<PubSubManager>> + Send + Sync>;
Expand description

Closure type for looking up PubSub managers by table name.

Arc<dyn Fn> (rather than Box<dyn Fn>) so that the enclosing Context can be Clone — required for flowing the owned Context through Tower Service<Context> chains (each link clones once, then consumes its clone). Arc::clone is a single atomic op; the closure body is shared, not copied.

Aliased Type§

pub struct PubSubLookupFn { /* private fields */ }