Skip to main content

write_frame

Function write_frame 

Source
pub async fn write_frame<W, T>(
    writer: &mut W,
    message: &T,
) -> Result<(), CodecError>
where W: AsyncWrite + Unpin, T: Serialize,
Expand description

Writes one length-prefixed task protocol message.

ยงErrors

Returns an error when serialization fails, the encoded frame is oversized, or the transport cannot be written.