rune_alloc/btree/
mod.rs

1mod append;
2mod borrow;
3mod fix;
4pub mod map;
5mod mem;
6mod merge_iter;
7mod navigate;
8mod node;
9mod remove;
10mod search;
11pub mod set;
12mod set_val;
13mod split;
14
15use core::cmp::Ordering;
16
17use crate::alloc::AllocError;
18
19trait Recover<Q: ?Sized> {
20    type Key;
21
22    fn get<C: ?Sized, E>(
23        &self,
24        cx: &mut C,
25        key: &Q,
26        cmp: fn(&mut C, &Q, &Q) -> Result<Ordering, E>,
27    ) -> Result<Option<&Self::Key>, E>;
28
29    fn take<C: ?Sized, E>(
30        &mut self,
31        cx: &mut C,
32        key: &Q,
33        cmp: fn(&mut C, &Q, &Q) -> Result<Ordering, E>,
34    ) -> Result<Option<Self::Key>, E>;
35
36    fn try_replace<C: ?Sized, E>(
37        &mut self,
38        cx: &mut C,
39        key: Self::Key,
40        cmp: fn(&mut C, &Q, &Q) -> Result<Ordering, E>,
41    ) -> Result<Result<Option<Self::Key>, AllocError>, E>;
42}