Function dialectic_tokio_serde_json::lines [−][src]
pub fn lines<W: AsyncWrite, R: AsyncRead>(
writer: W,
reader: R,
max_length: usize
) -> (Sender<Json, LinesCodec, W>, Receiver<Json, LinesCodec, R>)
Pairs the Json
serialization format with the LinesCodec
for framing, returning a symmetrical pair of Sender
and Receiver
.
The max_length
parameter indicates the maximum length of any message received or sent. An
error is thrown during encoding and decoding if a message exceeds this length.