ntex_util/channel/mod.rs
1//! Communication primitives
2
3mod cell;
4pub mod condition;
5pub mod mpsc;
6pub mod oneshot;
7pub mod pool;
8
9/// Error returned from a `Receiver` when the corresponding
10/// `Sender` is dropped.
11#[derive(Clone, Copy, PartialEq, Eq, Debug)]
12pub struct Canceled;
13
14impl std::fmt::Display for Canceled {
15 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
16 std::write!(f, "oneshot canceled")
17 }
18}
19
20impl std::error::Error for Canceled {}