pancurses_result/
lib.rs

1//! `pancurses-result` is a wrapper for `pancurses` that aims to
2//! provide a safe interface to `curses`.  This library aims to
3//! guarantee thread and memory safety, whereas `pancurses` just
4//! provides direct C bindings.
5//!
6//! Many curses functions have been renamed for one reason or another.  All
7//! renamed functions state the curses function they corollate to.
8//!
9//! The outermost class is [`Curses`].  It is initialized via
10//! [`initscr`].  Use its methods to manipulate the curses instance.
11//!
12//! [`Curses`] manages the [`Window`] representing `stdscr`.
13//!
14//! [`Curses`]: struct.Curses.html
15//! [`initscr`]: fn.initscr.html
16//! [`Window`]: struct.Window.html
17
18extern crate pancurses;
19#[macro_use]
20extern crate lazy_static;
21
22mod general;
23pub use general::*;
24mod initialize;
25pub use initialize::*;
26mod point;
27pub use point::*;
28mod curses;
29pub use curses::*;
30mod color;
31pub use color::*;
32mod window;
33pub use window::*;
34
35#[cfg(test)]
36mod tests {
37    use super::*;
38
39    fn type_assert_send<T: Send>() {}
40    fn type_assert_sync<T: Sync>() {}
41
42    #[test]
43    fn window_is_send() {
44        type_assert_send::<Window>();
45    }
46
47    #[test]
48    fn window_is_sync() {
49        type_assert_sync::<Window>();
50    }
51
52    #[test]
53    fn curses_is_send() {
54        type_assert_send::<Curses>();
55    }
56
57    #[test]
58    fn curses_is_sync() {
59        type_assert_sync::<Curses>();
60    }
61}