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
/// A props struct with a generated typestate builder.
///
/// Implemented by [`#[derive(Props)]`][derive]. The derive also generates an
/// inherent `builder()` function on the struct, so this trait only needs to be
/// in scope when the builder is constructed generically.
///
/// [derive]: derive.Props.html
/// Typestate marker for a required property that has been set.
///
/// Builders generated by [`#[derive(Props)]`][derive] track each required
/// property in a generic argument. Calling the property's setter flips that
/// argument to [`Set`]; before that it is a generated marker type named after
/// the property.
///
/// [derive]: derive.Props.html
;
/// Implemented by typestate markers of properties that have been set.
///
/// `build()` on a generated builder requires every required property's marker
/// to implement this trait. Markers of unset properties are types named after
/// the property, so the compile error names exactly which property is missing.