Derive Macro composable::derive_macros::RecursiveReducer
#[derive(RecursiveReducer)]
{
// Attributes available to this derive:
#[reducer]
}
Expand description
§Compiler Errors
The are a few common mistakes that will produce well-known compiler errors
§the trait bound xxxx::State: composable::RecursiveReducer
is not satisfied
| #[derive(RecursiveReducer)]
| ^^^^^^^^^^^^^^^^ the trait `composable::RecursiveReducer` is not implemented for `State`
|
= note: this error originates in the derive macro `RecursiveReducer`
Cause: You haven’t yet written an impl RecursiveReducer
for the type you added #[derive(RecursiveReducer)]
to.
§conflicting implementation for State
| #[derive(RecursiveReducer)]
| ^^^^^^^^^^^^^^^^ conflicting implementation for `State`
...
| impl Reducer for State {
| ---------------------- first implementation here
|
= note: this error originates in the derive macro `RecursiveReducer`
Cause: You declared an impl Reducer
, perhaps out of habit, rather than an impl RecursiveReducer
.
§the trait bound …: composable::Reducer
is not satisfied
| #[derive(RecursiveReducer)]
| ^^^^^^^^^^^^^^^^ the trait `composable::Reducer` is not implemented for `…`
|
= help: the following other types implement trait `composable::Reducer`:
⋮
= note: this error originates in the derive macro `RecursiveReducer`
where …
is replaced with the type of one of the struct’s fields in the error message.
Cause: A #[reducer(skip)]
attribute is missing.
§type mismatch resolving <impl Effects<Action = Action> as Effects>::Action == Action
| #[derive(RecursiveReducer)]
| ^^^^^^^^^^^^^^^^ expected `child::Action`, found `parent::Action`
|
= note: `parent::Action` and `child::Action` have similar names, but are actually distinct types
Cause: … From
§the trait bound menu::Action: composable::From<winit::Action>
is not satisfied
| #[derive(RecursiveReducer)]
| ^^^^^^^^^^^^^^^^ the trait `composable::From<parent::Action>` is not implemented for `child::Action`
|
Cause: … TryInto
- Or there is no wrapper around a child action for the
From
macro to wrap a child action with