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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
//! Selects what happens when new work targets an occupied slot.
//!
//! A [`ControllerSpec`](crate::ControllerSpec) carries one [`AdmissionPolicy`] into the controller.
//! After preflight, every policy takes the same idle-slot path and attempts registry admission.
//! The policy matters only while the slot has an owner:
//!
//! ```text
//! ControllerSpec
//! │ slot + policy
//! ▼
//! controller slot
//! ├── idle ──► start runtime registry admission
//! └── busy ──► apply AdmissionPolicy
//! ```
//!
//! A slot is busy during registry admission, task lifetime, and physical release.
//! This is an ownership state. The task body need not be polling at that moment.
//!
//! The policy belongs to the incoming submission, not to the slot.
//! Submissions with different policies may target the same slot.
/// The conflict policy for one controller submission.
///
/// The policy does not change task execution settings in [`TaskSpec`](crate::TaskSpec).
/// It only controls admission to the slot.
///
/// Choose [`Queue`](Self::Queue) when every item should be considered in FIFO order.
/// Choose [`Replace`](Self::Replace) when the next item should contain the newest value.
/// Choose [`DropIfRunning`](Self::DropIfRunning) when duplicate work may be skipped.
///
/// Match with a wildcard arm because this enum is non-exhaustive.