Whether the shim may be enabled *by default* (without an explicit user action naming this repository). Refuses while the repository has not opted in, or while any rollout gate is unmeasured or unpassed.
(&self)
| 759 | /// user action naming this repository). Refuses while the repository has |
| 760 | /// not opted in, or while any rollout gate is unmeasured or unpassed. |
| 761 | pub fn default_enablement(&self) -> Result<(), DefaultEnablementRefusal> { |
| 762 | if !self.enabled { |
| 763 | return Err(DefaultEnablementRefusal::NotOptedIn); |
| 764 | } |
| 765 | for (gate, state) in ROLLOUT_GATES { |
| 766 | if !state.measured { |
| 767 | return Err(DefaultEnablementRefusal::UnmeasuredGate { gate }); |
| 768 | } |
| 769 | if !state.passed { |
| 770 | return Err(DefaultEnablementRefusal::FailedGate { gate }); |
| 771 | } |
| 772 | } |
| 773 | Ok(()) |
| 774 | } |
| 775 | } |
| 776 | |
| 777 | /// Export identity mapping (RFC §5.5). |