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
//! # `real_time_note_taker`
//!
//! A reusable library providing a terminal user interface to take timestamped
//! notes in real time.
//!
//! ## Example
//!
//! ```no_run
//! use real_time_note_taker::{run, App};
//!
//! fn main() -> std::io::Result<()> {
//! let app = App::new();
//! let _app = run(app)?;
//! Ok(())
//! }
//! ```
pub use ;
pub use ;
use io;
pub use ;
/// Runs the real-time note taking application until the user exits.
///
/// # Arguments
/// * `app` - Initial [`App`] state to run.
///
/// # Returns
/// The final [`App`] state when the UI terminates.
///
/// # Examples
/// ```no_run
/// use real_time_note_taker::{run, App};
///
/// fn main() -> std::io::Result<()> {
/// let app = App::new();
/// let finished = run(app)?;
/// println!("{} notes", finished.notes.len());
/// Ok(())
/// }
/// ```
///
/// # Errors
/// Propagates any terminal initialization or rendering errors.
///
/// # See also
/// [`App::new`], [`App::save_to_file`], [`ui::init_terminal`], [`ui::run_ui`],
/// [`ui::restore_terminal`]