1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
//! # `See`
//!
//! A high-performance, asynchronous runtime-agnostic alternative to
//! `tokio::sync::watch`.
//!
//! This library provides unsync and sync watch channel, both offering a
//! `tokio`-compatible API while being completely runtime-agnostic.
//!
//! # Features
//!
//! - **Runtime-agnostic**: Works with any async runtime (tokio, smol, compio,
//! etc.)
//! - **High performance**: Outperforms tokio's native implementation in most
//! scenarios
//! - **Optional Thread-safe**: Both synchronized and unsynchronized versions
//! available
//!
//! # Usage
//!
//! ```
//! use see::sync::channel;
//!
//! # #[tokio::main]
//! # async fn main() {
//! let (tx, mut rx) = channel("initial value");
//!
//! // Send a new value
//! tx.send("new value").unwrap();
//!
//! // Receive changes
//! rx.changed().await.unwrap();
//! let value = rx.borrow_and_update();
//! assert_eq!(*value, "new value");
//! # }
//! ```
/// Error types for watch channel operations.