Expand description
View module - belongs to the Domain
layer - pure event handling algorithm
Structs§
- View
- View represents the event handling algorithm, responsible for translating the events into denormalized state, which is more adequate for querying.
It has two generic parameters
S
/State,E
/Event , representing the type of the values that View may contain or use.'a
is used as a lifetime parameter, indicating that all references contained within the struct (e.g., references within the function closures) must have a lifetime that is at least as long as ’a.
Traits§
- View
State Computation - Formalizes the
State Computation
algorithm for theview
to handle events based on the current state, and produce new state.