async_flow/io/
send_error.rs

1// This is free and unencumbered software released into the public domain.
2
3use thiserror::Error;
4
5#[derive(Clone, Copy, Debug, Eq, Error, PartialEq)]
6#[error("SendError")]
7pub struct SendError;
8
9#[cfg(feature = "flume")]
10impl<T> From<flume::SendError<T>> for SendError {
11    fn from(_input: flume::SendError<T>) -> Self {
12        Self // TODO
13    }
14}
15
16#[cfg(feature = "tokio")]
17impl<T> From<tokio::sync::mpsc::error::SendError<T>> for SendError {
18    fn from(_input: tokio::sync::mpsc::error::SendError<T>) -> Self {
19        Self // TODO
20    }
21}
22
23#[derive(Clone, Copy, Debug, Eq, Error, PartialEq)]
24#[error("TrySendError")]
25pub struct TrySendError;
26
27#[cfg(feature = "flume")]
28impl<T> From<flume::TrySendError<T>> for TrySendError {
29    fn from(_input: flume::TrySendError<T>) -> Self {
30        Self // TODO
31    }
32}
33
34#[cfg(feature = "tokio")]
35impl<T> From<tokio::sync::mpsc::error::TrySendError<T>> for TrySendError {
36    fn from(_input: tokio::sync::mpsc::error::TrySendError<T>) -> Self {
37        Self // TODO
38    }
39}