nekolib/traits/
push_pop.rs1pub trait Push {
2 type Input;
3 fn push(&mut self, x: Self::Input);
4}
5
6pub trait PushFront {
7 type Input;
8 fn push_front(&mut self, x: Self::Input);
9}
10
11pub trait PushBack {
12 type Input;
13 fn push_back(&mut self, x: Self::Input);
14}
15
16pub trait Pop {
17 type Output;
18 fn pop(&mut self) -> Option<Self::Output>;
19}
20
21pub trait PopFront {
22 type Output;
23 fn pop_front(&mut self) -> Option<Self::Output>;
24}
25
26pub trait PopBack {
27 type Output;
28 fn pop_back(&mut self) -> Option<Self::Output>;
29}