orx-selfref-col 3.2.0

SelfRefCol is a core data structure to conveniently build safe and efficient self referential collections, such as linked lists and trees.
Documentation
1
2
3
4
5
6
7
8
9
10
11
/// Memory state of a self referential collection.
#[derive(Clone, Copy, Debug, PartialEq, Eq, Default, Hash)]
pub struct MemoryState {
    pub(crate) id: usize,
}

impl MemoryState {
    pub(crate) const fn successor_state(&self) -> Self {
        Self { id: self.id + 1 }
    }
}