1 2 3 4 5 6 7 8 9 10 11 12
pub trait Action {
type State<'s>;
type Value;
type Error;
}
pub trait Target<A>
where
A: Action,
{
fn update(&mut self, action: A, state: A::State<'_>) -> Result<A::Value, A::Error>;
}
1 2 3 4 5 6 7 8 9 10 11 12
pub trait Action {
type State<'s>;
type Value;
type Error;
}
pub trait Target<A>
where
A: Action,
{
fn update(&mut self, action: A, state: A::State<'_>) -> Result<A::Value, A::Error>;
}