Rework some error types

This commit is contained in:
Dominik Werder
2025-02-07 12:04:31 +01:00
parent 1aab18dc7f
commit 80dfb4069d
12 changed files with 94 additions and 85 deletions
+9 -8
View File
@@ -25,14 +25,15 @@ use streams::tcprawclient::HttpSimplePost;
use tokio::io::AsyncWriteExt;
use tokio::net::TcpStream;
#[derive(Debug, thiserror::Error)]
#[cstm(name = "TcpRawClient")]
pub enum Error {
IO(#[from] std::io::Error),
Frame(#[from] items_2::frame::Error),
Framable(#[from] items_2::framable::Error),
StreamsRawClient(#[from] streams::tcprawclient::Error),
}
autoerr::create_error_v1!(
name(Error, "TcpRawClient"),
enum variants {
IO(#[from] std::io::Error),
Frame(#[from] items_2::frame::Error),
Framable(#[from] items_2::framable::Error),
StreamsRawClient(#[from] streams::tcprawclient::Error),
},
);
pub type BoxedStream<T> = Pin<Box<dyn Stream<Item = Sitemty<T>> + Send>>;