pub async fn write_frame<T>(
writer: &mut (impl AsyncWrite + Unpin),
value: &T,
) -> Result<()>where
T: Serialize,Expand description
Writes one bounded length-prefixed JSON value. Discard the connection after a write error: the frame may be partially written.
§Errors
Returns an error if the value cannot be encoded or persisted.