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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
//! # Hojicha Runtime
//!
//! Event handling and async runtime for Hojicha TUI applications.
//!
//! This crate provides the runtime infrastructure for handling events,
//! managing async operations, and running the main application loop.
//!
//! ## Core Components
//!
//! - **Program**: Main application runtime and event loop
//! - **Event Processing**: Priority-based event handling with backpressure
//! - **Async Support**: Tokio-based async command execution
//! - **Subscriptions**: Stream-based event sources
//! - **Error Resilience**: Panic recovery and error handling
//!
//! ## Features
//!
//! - Priority event queue with automatic scaling
//! - Resilient input handling with panic recovery
//! - Safe mutex operations that recover from poison
//! - Metrics and monitoring support
//! - Terminal management and restoration
// Note: Event types are in hojicha-core since they're fundamental to the Model trait
// Program and runtime
pub use ;
// Shared runtime infrastructure
// Async support
// Event processing infrastructure
// Testing utilities
// Error resilience
// String-based rendering
// Re-export from core
pub use ;
// Re-export runtime types
pub use AsyncHandle;
pub use Subscription;
// Re-export program components
pub use ;
/// Prelude for convenient imports
///
/// This module provides the essential runtime types for Hojicha applications.
/// Import everything with:
///
/// ```
/// use hojicha_runtime::prelude::*;
/// ```
///
/// ## Included Items
///
/// ### Program & Configuration
/// - [`Program`] - The main application runtime
/// - [`ProgramOptions`] - Configuration for the program
/// - [`MouseMode`] - Mouse tracking options
///
/// ### Async Support
/// - [`AsyncHandle`] - Handle for cancellable async operations
/// - [`Subscription`] - Stream subscription handle
///
/// ### Stream Builders
/// - [`interval_stream()`] - Create periodic event streams
/// - [`timeout_stream()`] - Create timeout streams
/// - [`delayed_stream()`] - Create delayed streams