Function dialectic_tokio_serde::symmetrical_with_capacity[][src]

pub fn symmetrical_with_capacity<F, E, W, R>(
    format: F,
    encoding: E,
    writer: W,
    reader: R,
    capacity: usize
) -> (Sender<F, E, W>, Receiver<F, E, R>) where
    F: Serializer + Deserializer<<E as Decoder>::Item> + Clone,
    E: Encoder<<F as Serializer>::Output> + Decoder + Clone,
    W: AsyncWrite,
    R: AsyncRead

Create a Sender/Receiver pair which use the same serialization format and frame encoding in both directions, allocating an initial capacity for the read buffer on the receiver.