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
//! ```rust
//! # use verona_rt::{
//! #     cown::CownPtr,
//! #     scheduler::with,
//! #     when::{when, when2},
//! # };
//!
//! # with(|| {
//! let string = CownPtr::new(String::new());
//! let vec = CownPtr::new(Vec::new());
//!
//! when(&string, |mut s| {
//!     assert_eq!(&*s, "");
//!     s.push_str("foo");
//! });
//! when(&vec, |mut v| {
//!     assert_eq!(&*v, &[]);
//!     v.push(101);
//! });
//! when2(&string, &vec, |mut s, mut v| {
//!     assert_eq!(&*s, "foo");
//!     assert_eq!(&*v, &[101]);
//!     s.push_str("bar");
//!     v.push(666);
//! });
//!
//! when(&string, |s| assert_eq!(&*s, "foobar"));
//! when(&vec, |v| assert_eq!(&*v, &[101, 666]));
//! # });
//! ```
//!
//! ## Current Status
//!
//! This is a research project, and is at an early stage of development. It is not
//! ready for use outside of research.
//!
//! ## Restrictions:
//!
//! 1. *Don't leak threads*: When the main thread finishes, all other threads
//!    shut down. If you've accessed verona-rt resources in other threads,
//!    you'll have a bad time.
//!
//!
//! ## Current Status
//!
//! This is a research project, and is at an early stage of development. It is not
//! ready for use outside of research.

// It'd be nice, see #17, but we need mutex's
// #![no_std]

pub mod cown;
pub mod log;
pub mod scheduler;
pub mod when;