orx_tree/traversal/
over_mut.rs1use super::{
2 enumeration::Enumeration,
3 node_item_mut::NodeItemMut,
4 over::{Over, OverData, OverDepthData, OverDepthSiblingIdxData, OverSiblingIdxData},
5};
6use crate::{
7 TreeVariant,
8 memory::{Auto, MemoryPolicy},
9 pinned_storage::{PinnedStorage, SplitRecursive},
10};
11use orx_selfref_col::Variant;
12
13pub type OverItemMut<'a, V, O, M = Auto, P = SplitRecursive> =
14 <<O as Over>::Enumeration as Enumeration>::Item<<O as OverMut>::NodeItemMut<'a, V, M, P>>;
15
16pub type OverItemInto<'a, V, O> =
17 <<O as Over>::Enumeration as Enumeration>::Item<<V as Variant>::Item>;
18
19pub trait OverMut: Over {
24 type NodeItemMut<'a, V, M, P>: NodeItemMut<'a, V, M, P>
26 where
27 M: MemoryPolicy,
28 P: PinnedStorage,
29 V: TreeVariant + 'a,
30 Self: 'a;
31}
32
33impl OverMut for OverData {
36 type NodeItemMut<'a, V, M, P>
37 = &'a mut V::Item
38 where
39 M: MemoryPolicy,
40 P: PinnedStorage,
41 V: TreeVariant + 'a,
42 Self: 'a;
43}
44
45impl OverMut for OverDepthData {
48 type NodeItemMut<'a, V, M, P>
49 = &'a mut V::Item
50 where
51 M: MemoryPolicy,
52 P: PinnedStorage,
53 V: TreeVariant + 'a,
54 Self: 'a;
55}
56
57impl OverMut for OverSiblingIdxData {
60 type NodeItemMut<'a, V, M, P>
61 = &'a mut V::Item
62 where
63 M: MemoryPolicy,
64 P: PinnedStorage,
65 V: TreeVariant + 'a,
66 Self: 'a;
67}
68
69impl OverMut for OverDepthSiblingIdxData {
72 type NodeItemMut<'a, V, M, P>
73 = &'a mut V::Item
74 where
75 M: MemoryPolicy,
76 P: PinnedStorage,
77 V: TreeVariant + 'a,
78 Self: 'a;
79}