icentral_node_stack/
delegate.rs

1crate::ix!();
2
3#[macro_export] macro_rules! delegate_to_bfs_stack {
4    ($ty:ty) => {
5
6        impl $ty {
7            delegate! {
8                to self.stack {
9
10                    #[call(push)]
11                    pub fn stack_push(&mut self, n: NodeId);
12
13                    #[call(pop)]
14                    pub fn stack_pop(&mut self) -> Option<NodeId>;
15
16                    #[call(len)]
17                    pub fn stack_len(&self) -> usize;
18
19                    #[call(node_at_index)]
20                    pub fn stack_node_at_index(&self, idx: usize) -> NodeId;
21
22                    #[call(set_node_at_index)]
23                    pub fn stack_set_node_at_index(&mut self, idx: usize, n: NodeId);
24                }
25            }
26        }
27    }
28}
29