spawn_fut

Function spawn_fut 

Source
pub async fn spawn_fut<St, Sv>(
    stream: St,
    service: Sv,
    controller: Controller,
) -> Result<(), BoxError>
where St: AsyncReadExt + AsyncWriteExt + Unpin + Send + 'static, Sv: Service<BytesMut, Response = BytesMut, Error = Error> + Send + 'static, Sv::Future: Send,
Expand description

Spawns a future to handle streams of requests (e.g. a tcp stream).

ยงErrors

Will return Err if failed to read bytes from stream or send bytes to stream.