1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// Copyright 2023 Developers of the reconcile project.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
//! Generic-bound bundles (see ARCHITECTURE.md §3.8).
//!
//! The reconciliation machinery repeats the same multi-bound constraints on every key and value
//! type parameter. [`Key`] and [`Value`] bundle those *data* bounds (Clone/Debug/Hash/…/`'static`)
//! once, with blanket impls, so implementation sites can read `impl<K: Key, V: Value>` instead of
//! spelling the full list out each time.
//!
//! These bundles cover only the data bounds; *entry-semantics* bounds (such as
//! [`Projectable`](crate::reconcilable::Projectable)) are not bundled here and travel as extra
//! bounds alongside `V: Value` where required.
use Debug;
use Hash;
use DeserializeOwned;
use Serialize;
/// Bundle of the data bounds required of a key type throughout the reconciliation machinery.
///
/// A blanket impl makes any type that satisfies the listed bounds a `Key` automatically, so this
/// never has to be implemented by hand. It does not add or remove any concrete bound; it is purely
/// a shorthand for the repeated `Clone + Debug + Hash + Ord + Send + Sync + Serialize +
/// DeserializeOwned + 'static` list.
/// Bundle of the data bounds required of a value type throughout the reconciliation machinery.
///
/// A blanket impl makes any type that satisfies the listed bounds a `Value` automatically, so this
/// never has to be implemented by hand. It does not add or remove any concrete bound; it is purely
/// a shorthand for the repeated `Clone + Debug + Hash + PartialEq + Send + Sync + Serialize +
/// DeserializeOwned + 'static` list. Note it requires `PartialEq` (not `Ord`), unlike [`Key`].