Function send_response
pub async fn send_response<T>(
send: &mut SendStream,
buf: &mut Vec<u8>,
body: T,
) -> Result<(), Error>where
T: Serialize,
Expand description
Sends a response to a request.
ยงErrors
Returns std::io::ErrorKind::InvalidData
if the message is too large, or
other errors if the message could not be written to the stream.