type Store
import bendvy-ecs-core@0.1.0.3/execution_stream_channel.bend as ExecutionStreamChannelimport Base
import bendvy-ecs-core@0.1.0.3/machine_stream_queue.bend as Queue
import bendvy-ecs-core@0.1.0.3/change_tick.bend as Tick
5# Shared message storage. Sequence numbers are independent of World ticks.
6# Bevy code: https://github.com/bevyengine/bevy/blob/ad678262ce53b5d142fe49ee5e08caff6f00ab60/crates/bevy_ecs/src/message/message_cursor.rs#L54-L63
7# Behavior: each reader tracks message count, independently of change ticks.
8# Bevy code: https://github.com/bevyengine/bevy/blob/ad678262ce53b5d142fe49ee5e08caff6f00ab60/crates/bevy_ecs/src/message/messages.rs#L188-L201
9# Behavior: every update removes the older generation and rotates the retained one.
10type Store<-E:Data> is Data:
11 Store{queue:Queue.Queue<E>,olderThrough:Nat,maintenance:Maybe<&2,Tick.Tick>}