Methods
The number of shared references to the value.
Examples
use snapshot;
let v = ;
let s = snapshot?;
assert_eq!;
// An iterators takes a shared reference to the collection being iterated over.
let it = v.iter;
let s = snapshot?;
assert_eq!;
drop;
let s = snapshot?;
assert_eq!;
Test if the snapshot indicates that the value is exclusively held.
Examples
use snapshot;
let v = ;
let s = snapshot?;
assert_eq!;
assert!;
assert!;
assert!;
// Assign to a separate variable since the compiler will notice that `v` is moved.
let u = v;
// Move the value into a closure, causing the original reference to become exclusively held.
let closure = move || ;
let s = snapshot?;
assert!;
assert!;
assert!;
Test if the snapshot indicates that the value is readable.
Examples
use snapshot;
let v = ;
let s = snapshot?;
assert_eq!;
assert!;
assert!;
assert!;
// Assign to a separate variable since the compiler will notice that `v` is moved.
let u = v;
// Move the value into a closure, causing the original reference to become exclusively held.
let closure = move || ;
let s = snapshot?;
assert!;
assert!;
assert!;
Test if the snapshot indicates that the value is writable.
Examples
use snapshot;
let v = ;
let s = snapshot?;
assert_eq!;
assert!;
assert!;
assert!;
// Assign to a separate variable since the compiler will notice that `v` is moved.
let u = v;
// Move the value into a closure, causing the original reference to become exclusively held.
let closure = move || ;
let s = snapshot?;
assert!;
assert!;
assert!;