respond

Function respond 

Source
pub async fn respond<S>(stream: &mut S, response: Response) -> Result<()>
where S: AsyncWrite + Unpin,
Expand description

Respond writes the provided response to the stream; this should be called before any part of the body is written. After being called, the body can be written directly to the stream.