# Objective Provide a generic `impl SystemParam for Option<P>` that uses system parameter validation. This immediately gives useful impls for params like `EventReader` and `GizmosState` that are defined in terms of `Res`. It also allows third-party system parameters to be usable with `Option`, which was previously impossible due to orphan rules. Note that this is a behavior change for `Option<Single>`. It currently fails validation if there are multiple matching entities, but with this change it will pass validation and produce `None`. Also provide an impl for `Result<P, SystemParamValidationError>`. This allows systems to inspect the error if necessary, either for bubbling it up or for checking the `skipped` flag. Fixes #12634 Fixes #14949 Related to #18516 ## Solution Add generic `SystemParam` impls for `Option` and `Result`, and remove the impls for specific types. Update documentation and `fallible_params` example with the new semantics for `Option<Single>`. |
||
|---|---|---|
| .. | ||
| .gitkeep | ||
| generic-option-parameter.md | ||
| merge_observerState_observer_single_component.md | ||
| observers_may_not_be_exclusive.md | ||
| overflowclipbox_default_is_now_paddingbox.md | ||
| remove_archetypecomponentid.md | ||
| remove_deprecated_batch_spawning.md | ||
| rename_StateScoped.md | ||
| simple_executor_going_away.md | ||
| system_set_naming_convention.md | ||