aboutsummaryrefslogtreecommitdiff
path: root/src/transport/mod.rs
blob: cf49d31614b5d033c6e90524b6f912eb5b53ca66 (plain)
1
2
3
4
5
6
7
8
9
10
11
use crate::encoding::{request::Request, response::Response};
use anyhow::Result;

pub mod tcp;
pub mod udp;

#[allow(async_fn_in_trait)]
pub trait Transport {
    async fn recv(&self) -> Result<Response>;
    async fn send(&self, request: Request) -> Result<()>;
}