output-tracker 0.1.1

Track and assert state of dependencies in state-based tests without mocks
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use std::sync::atomic::{AtomicU64, Ordering};

static HANDLE_ID: AtomicU64 = AtomicU64::new(0);

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct TrackerHandle(u64);

impl TrackerHandle {
    pub(crate) fn new() -> Self {
        Self(HANDLE_ID.fetch_add(1, Ordering::AcqRel))
    }
}