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
//! Streaming responses over a typed channel.
//!
//! A procedure that takes a [`Channel<T>`] streams zero or more `T`
//! values back to the caller, on top of (and independent of) the single
//! value it eventually resolves with. This mirrors
//! [`tauri::ipc::Channel<T>`] but is built through tauri_typed_ipc's
//! runtime-erased dispatch: the handler constructs the underlying tauri
//! channel from the webview -- the one `R`-typed step -- and hands a
//! procedure this wrapper, which carries no `R`. Because the wrapper
//! owns its channel (rather than borrowing the dispatch [`Context`]), it
//! can also cross into an `async fn`'s spawned future, unlike the
//! borrowed `AppHandle`/`State` injections.
//!
//! [`Context`]: crate::Context
use PhantomData;
use ;
/// A typed, one-way channel a procedure streams values through.
///
/// Obtained by declaring a `Channel<T>` parameter on a `#[procedures]`
/// method; the client passes the matching JavaScript `Channel` and
/// receives every [`send`](Self::send).