OptionalServerHookHandler

Type Alias OptionalServerHookHandler 

Source
pub type OptionalServerHookHandler = Option<ServerHookHandler>;
Expand description

Type alias for an optional server hook handler.

This type allows storing optional handlers of different concrete types in the same collection. The handler takes a &Context and returns a pinned, boxed future that resolves to ().

Aliased Type§

pub enum OptionalServerHookHandler {
    None,
    Some(Arc<dyn Fn(&Context) -> Pin<Box<dyn Future<Output = ()> + Send>> + Send + Sync>),
}

Variants§

§1.0.0

None

No value.

§1.0.0

Some(Arc<dyn Fn(&Context) -> Pin<Box<dyn Future<Output = ()> + Send>> + Send + Sync>)

Some value of type T.