Set enum metric state.
(self, state: str)
| 788 | self._lock = Lock() |
| 789 | |
| 790 | def state(self, state: str) -> None: |
| 791 | """Set enum metric state.""" |
| 792 | self._raise_if_not_observable() |
| 793 | with self._lock: |
| 794 | self._value = self._states.index(state) |
| 795 | |
| 796 | def _child_samples(self) -> Iterable[Sample]: |
| 797 | with self._lock: |