Trait enum_to_enum::WithEffects [−][src]
pub trait WithEffects where
Self: Sized, {
type Value;
type Effect;
fn new(value: Self::Value, effects: Vec<Self::Effect>) -> Self;
fn into_value_and_effects(
self
) -> (Self::Value, Box<dyn Iterator<Item = Self::Effect>>);
fn compose_from(
value: Self::Value,
composed_effects: Box<[Self::Effect]>
) -> Self { ... }
}
Expand description
Any struct specified as an effect_container
for the from_enum
attribute must implement WithEffects
.
WithEffects
specifies a container for a value, the result of some conversion, and an ordered
list of effects arising from that conversion.
It is expected that these effects correspond to some actions to take subsequent to the conversion.
Associated Types
Required methods
Creates a new instance of this WithEffects
implementor with the given value and effects.