terrazzo-client 0.2.20

A simple macro to clone variables before passing them into a `move` closure or async block.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord)]
pub struct Depth {
    depth: i32,
}

impl Depth {
    pub fn zero() -> Self {
        Self { depth: 0 }
    }

    pub fn next(self) -> Self {
        Self {
            depth: self.depth + 1,
        }
    }
}