proto_tower_util/
write_to.rs

1use async_trait::async_trait;
2use std::fmt::Debug;
3use tokio::io::AsyncWriteExt;
4
5#[async_trait]
6pub trait WriteTo<Writer, E>
7where
8    Writer: AsyncWriteExt + Send + Unpin + 'static,
9    E: Debug,
10{
11    async fn write_to(&self, writer: &mut Writer) -> Result<(), E>;
12}