♐ rt_ref
Ref
types with internal mutability that implement Send
and Sync
.
These types are shared by rt_map
and rt_vec
.
Usage
Add the following to Cargo.toml
:
= "0.2.1" # or
= { = "0.2.1", = ["unsafe_debug"] }
In code:
use ;
let a = 1;
// Insert a value into a collection, wrapped with `Cell`.
let mut v = Vec new;
v.push;
let v = v; // v is now compile-time immutable.
let a = v.get.map;
a.map;
let a = v.get.map;
assert_eq!;
Features
"unsafe_debug"
:
The borrowed reference will use the inner type's Debug
implementation when formatted.
use ;
let mut v = Vec new;
v.push;
assert_eq!;
assert_eq!;
License
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.