pub fn set_state(state: State)
Sets the current state of the service.
In most cases, the service state is updated automatically and does not need to be set directly.