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
62
63
//! Future types module for the I/O event system.
//!
//! This module provides type aliases for futures used throughout the event system:
//! - [`FutureRet`]: A boxed future that can be sent and shared between threads
//! - [`SubscribeFutureRet`]: A future that returns a result from event subscription
//!
//! # Examples
//! ```rust
//! use ioevent::prelude::*;
//!
//! async fn handle_event(state: State<()>, event: EventData) -> SubscribeFutureRet {
//! Box::pin(async move {
//! // Process the event
//! Ok(())
//! })
//! }
//! ```
//!
//! For more examples and detailed usage, see the individual type documentation.
use Future;
use Pin;
use crateCallSubscribeError;
/// A boxed future that can be sent and shared between threads.
///
/// This type alias represents a pinned, boxed future that:
/// - Can be sent between threads (`Send`)
/// - Can be shared between threads (`Sync`)
/// - Returns a value of type `T`
///
/// # Examples
/// ```rust
/// use ioevent::prelude::*;
///
/// async fn create_future() -> FutureRet<String> {
/// Box::pin(async move {
/// "Hello, world!".to_string()
/// })
/// }
/// ```
pub type FutureRet<T> = ;
/// A future that returns a result from event subscription.
///
/// This type alias represents a future that:
/// - Returns a `Result<(), CallSubscribeError>`
/// - Can be sent between threads
/// - Can be shared between threads
///
/// # Examples
/// ```rust
/// use ioevent::prelude::*;
///
/// async fn subscribe_to_event(_: State<()>, _: EventData) -> SubscribeFutureRet {
/// Box::pin(async move {
/// // Subscribe to the event
/// Ok(())
/// })
/// }
/// ```
pub type SubscribeFutureRet = ;