rcell 2.0.0

A Cell which can hold either an Arc or an Weak smartpointer or be empty
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use rcell::*;

#[test]
fn std_type() {
    let rcell = RCell::new("foobar");
    assert!(rcell.retained());
}

#[test]
fn own_type() {
    struct MyType(&'static str);
    let rcell = RCell::new(MyType("foobar"));
    assert!(rcell.retained());
}