Write all bytes to an async writer.
(writer: &mut (impl tokio::io::AsyncWrite + Unpin), data: &[u8])
| 2091 | |
| 2092 | /// Write all bytes to an async writer. |
| 2093 | async fn write_all(writer: &mut (impl tokio::io::AsyncWrite + Unpin), data: &[u8]) -> Result<()> { |
| 2094 | use tokio::io::AsyncWriteExt; |
| 2095 | writer.write_all(data).await.into_diagnostic()?; |
| 2096 | writer.flush().await.into_diagnostic()?; |
| 2097 | Ok(()) |
| 2098 | } |
| 2099 | |
| 2100 | #[derive(Debug, Clone)] |
| 2101 | struct L7ConfigSnapshot { |