void emit(Result<State, Exception> state) { if (state is Ok) { _state.add(state); } else { _state.addError(state); } }