binprot 0.1.7

Rust implementation of the bin_prot protocol.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use async_trait::async_trait;
use tokio::io::{AsyncReadExt, AsyncWriteExt};

#[async_trait]
pub trait BinProtWriteAsync {
    async fn binprot_write_async<W: AsyncWriteExt>(&self, w: &mut W) -> std::io::Result<()>;
}

#[async_trait]
pub trait BinProtReadAsync {
    async fn binprot_read_async<R: AsyncReadExt + ?Sized>(
        r: &mut R,
    ) -> Result<Self, crate::error::Error>
    where
        Self: Sized;
}