icentral_node_stack/
traits.rs

1crate::ix!();
2
3pub trait NodeAtIndex {
4
5    fn node_at_index(&self, idx: usize) -> NodeId;
6}
7
8pub trait SetNodeAtIndex {
9
10    fn set_node_at_index(&mut self, idx: usize, n: NodeId);
11}
12
13pub trait Push {
14
15    type Item;
16
17    fn push(&mut self, n: Self::Item);
18}
19
20pub trait Pop {
21
22    type Item;
23
24    fn pop(&mut self) -> Option<Self::Item>;
25}