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
use crate::;
/// Indicate that a [`Table`] is *part of* a [`Schema`]
///
/// Do not implement this trait manually, it will be implemented by the [`#[database]`](crate::database) proc-macro.
///
/// The unit type `()` is used to mean "this [`Table`] does not reference anything" -- as such it counts as "part of" every [`Schema`].
/// Check that every type in a nested tuple is [`PartOf`] the given [`Schema`]
///
/// This "unrolls" the nested type.
/// Check that every type that a [`Table`] references is part of [`Schema`] `S`
///
/// Do not implement this trait, just make sure your [`Table`]s only contain valid references.
/// Check whether a [`Table`] is valid for use in a given [`Schema`]
///
/// A Table is valid IFF all of it's fields only reference tables that are also part of the [`Schema`].
///
/// An `impl` for this is generated by the [`#[database]`](crate::database) proc-macro.
/// This then causes the compiler to verify that [`RefsArePartOf`] is implemented for the given [`Table`] & [`Schema`] pairing.