pub fn adapt_with_option<R, W, O>(
    stream: (R, W),
    option: O
) -> (impl Stream<Item = Result<Envelope>>, impl Sink<Envelope, Error = Error>)where
    R: AsyncRead,
    W: AsyncWrite,
    O: Options + Copy,
Expand description

Helper function to construct a pair of stream and sink with codec deserialize to Envelope from given pair of reader and writer. This is like adapt but with a custom bincode option.