ntex_util/channel/
mod.rs

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