from_fn

Function from_fn 

Source
pub fn from_fn<F, Fut>(f: F) -> FnHandler<F>
where F: Fn(ConnectionHandle) -> Fut + Send + Sync + Clone + 'static, Fut: Future<Output = Result<()>> + Send + 'static,
Expand description

Create a handler from a function