Skip to main content

SocketEventFn

Type Alias SocketEventFn 

Source
pub type SocketEventFn = Arc<dyn Fn(Container, Option<SocketRef>, Value, AckSink) -> Pin<Box<dyn Future<Output = ()> + Send>> + Send + Sync>;
Expand description

Deserialize + validate + dispatch + ack, all inside the closure the macro emits. The socket is Option because a test drives the same closure without a live connection โ€” see AckSink for the other half of that. A handler that asked for a SocketRef and gets None reports it rather than pretending.

Aliased Typeยง

pub struct SocketEventFn { /* private fields */ }