osom_lib_trees/traits/
operation_results.rs1use osom_lib_primitives::KeyValuePair;
3
4#[must_use]
5pub enum TreeQueryExactResult<'a, TKey: 'a, TValue: 'a> {
6 NotFound,
7 Found { key: &'a TKey, value: &'a TValue },
8}
9
10#[must_use]
11pub enum TreeQueryExactMutResult<'a, TKey: 'a, TValue: 'a> {
12 NotFound,
13 Found { key: &'a TKey, value: &'a mut TValue },
14}
15
16#[must_use]
17pub trait TreeQueryResult<'a, TKey: 'a, TValue: 'a>:
18 core::ops::Deref<Target = [KeyValuePair<&'a TKey, &'a TValue>]>
19{
20}
21
22#[must_use]
23pub trait TreeQueryMutResult<'a, TKey: 'a, TValue: 'a>:
24 core::ops::DerefMut<Target = [KeyValuePair<&'a TKey, &'a mut TValue>]>
25{
26}