stable-id 0.4.1

This crate mainly deals with issuing and maintaining stability of indices.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use stable_id_traits::Successor;

use crate::Sequence;

impl<IndexT> Sequence<IndexT>
where
    IndexT: Successor + Clone + Copy,
{
    pub const fn continue_from(start: IndexT) -> Self {
        Self { counter: start }
    }

    pub fn next_value(&mut self) -> IndexT {
        let ret = self.counter;
        self.counter = ret.next_value();
        ret
    }
}