Function orkas_core::adapt

source ·
pub fn adapt<R, W>(
    stream: (R, W)
) -> (impl Stream<Item = Result<Envelope>>, impl Sink<Envelope, Error = Error>)where
    R: AsyncRead,
    W: AsyncWrite,
Expand description

Helper function to construct a pair of stream and sink with codec deserialize to Envelope from given pair of reader and writer.