bos 0.3.1

Flexible Borrowed, Owned or Shared (B.O.S.) smart pointers. Like std's Cow but with Rc/Arc and without the ToOwned requirement.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
mod abos;
mod bos_;

#[test]
fn size_of_bos_str() {
    use bos::{AbosStr, BosStr};
    use std::borrow::Cow;
    use std::mem::size_of;

    dbg!(size_of::<&str>());
    dbg!(size_of::<String>());
    dbg!(size_of::<AbosStr>());
    dbg!(size_of::<BosStr>());
    dbg!(size_of::<Cow<str>>());
    assert_eq!(size_of::<Cow<str>>(), size_of::<AbosStr>());
    assert_eq!(size_of::<Cow<str>>(), size_of::<BosStr>());
}