praborrow-core 1.2.2

Core primitives for PraBorrow. Implements Sovereign<T> for distributed ownership enforcement.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
#[test]
fn test_sovereign_debug() {
    use crate::Sovereign;
    let s = Sovereign::new(42);
    let debug_str = format!("{:?}", s);
    assert!(debug_str.contains("Domestic"));
    assert!(debug_str.contains("42"));
    
    s.annex().unwrap();
    let debug_str_exiled = format!("{:?}", s);
    assert!(debug_str_exiled.contains("Exiled"));
    assert!(debug_str_exiled.contains("Inaccessible"));
}