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 PhantomData;
use crateSvidGenerator;
/// Marker trait associating a zero-sized "kind" type with an SVID tag and a
/// concrete `Id` newtype.
///
/// Implemented by `#[derive(svid::Svid)]` for each variant's `<Variant>Marker`,
/// e.g. `impl SvidKind for UserIdMarker { type Id = UserId; const TAG: u8 = ... }`.
/// Typed wrapper around `SvidGenerator` that returns the strongly-typed `Id`
/// associated with `K`.
/// Type-driven dispatch trait implemented by the `Svid` derive on the registry
/// it generates: lets callers write `let u: UserId = reg.generate_id();`.