reft-light 0.3.1

A concurrency primitive for high concurrency reads over a single-writer data structure.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#[cfg(test)]
#[derive(Debug)]
pub struct CounterAddOp(pub i32);

#[cfg(test)]
impl Apply<i32, ()> for CounterAddOp {
    fn apply_first(&mut self, first: &mut i32, _: &i32, _: &mut ()) {
        *first += self.0;
    }

    fn apply_second(self, _: &i32, second: &mut i32, _: &mut ()) {
        *second += self.0;
    }
}