Skip to main content

socket_fn

Function socket_fn 

Source
pub fn socket_fn<F, Fut>(function: F) -> impl SocketTransport
where F: Fn(SocketRequest) -> Fut + Send + Sync + 'static, Fut: Future<Output = Result<()>> + Send + 'static,
Expand description

Adapt an async Rust function, such as an in-process server or a mock, to a socket transport.