execution_machine_state.bend checks
raw source on the hub · import bendvy-ecs-core@0.1.0.3/execution_machine_state.bend as Execution_machine_state
5 imports
import Base import ./machine.bend as M import ./machine_queue.bend as Queue import ./execution_machine_stream.bend as Stream import ./change_tick.bend as Tick
Types
type Cell source · line 8 · raw
@-S:Data -> @-K:Data -> @-V:Data -> Type
The Cell is framework storage. Ordinary bodies receive declaration-derived ops.
Cell@-S:Data -> @-K:Data -> @-V:Data -> @slot:0x704c77730661eff4309838fc738ef615/machine.Slot<S, K, V> -> @stream:0x704c77730661eff4309838fc738ef615/execution_machine_stream.Store<V> -> @revision:Nat -> @stamp:Maybe<&2, 0x704c77730661eff4309838fc738ef615/change_tick.Tick> -> @nextStamp:Maybe<&2, 0x704c77730661eff4309838fc738ef615/change_tick.Tick> -> @sequence:Nat -> @initialPending:Bool -> @namespace:Maybe<&2, U32> -> @intent:Intent<V> -> Cell<S, K, V>
type Intent source · line 10 · raw
@-V:Data -> Data
Idle@-V:Data -> Intent<V>
Initial@-V:Data -> @value:V -> Intent<V>
Transition@-V:Data -> @from:V -> @to:V -> @runExitEnter:Bool -> Intent<V>
type View source · line 14 · raw
@-S:Data -> @-K:Data -> @-V:Data -> Data
View@-S:Data -> @-K:Data -> @-V:Data -> @current:0x704c77730661eff4309838fc738ef615/machine.CurrentView<S, K, V> -> @next:0x704c77730661eff4309838fc738ef615/machine.NextView<S, K, V> -> @revision:Nat -> @stamp:Maybe<&2, 0x704c77730661eff4309838fc738ef615/change_tick.Tick> -> @nextStamp:Maybe<&2, 0x704c77730661eff4309838fc738ef615/change_tick.Tick> -> @intent:Intent<V> -> View<S, K, V>
Definitions
def projected source · line 18 · raw
@-S:Data -> @-K:Data -> @-V:Data -> @cell:Cell<S, K, V> -> Pair(Cell<S, K, V>, View<S, K, V>)
def queue_generic source · line 21 · raw
@-S:Data -> @-K:Data -> @-V:Data -> @same:(@_:V -> @_:V -> Bool) -> @cell:Cell<S, K, V> -> @request:0x704c77730661eff4309838fc738ef615/machine.QueueInput<V> -> Cell<S, K, V>
def request_stamped_generic source · line 30 · raw
@-S:Data -> @-K:Data -> @-V:Data -> @tick:0x704c77730661eff4309838fc738ef615/change_tick.Tick -> @cell:Cell<S, K, V> -> Pair(Cell<S, K, V>, Unit)
def queued_at_generic source · line 37 · raw
@-S:Data -> @-K:Data -> @-V:Data -> @same:(@_:V -> @_:V -> Bool) -> @request:0x704c77730661eff4309838fc738ef615/machine.QueueInput<V> -> @tick:0x704c77730661eff4309838fc738ef615/change_tick.Tick -> @cell:Cell<S, K, V> -> Pair(Cell<S, K, V>, Unit)
def next_revision source · line 48 · raw
@same:Bool -> @revision:Nat -> Nat
def next_stamp source · line 52 · raw
@same:Bool -> @stamp:Maybe<&2, 0x704c77730661eff4309838fc738ef615/change_tick.Tick> -> @tick:0x704c77730661eff4309838fc738ef615/change_tick.Tick -> Maybe<&2, 0x704c77730661eff4309838fc738ef615/change_tick.Tick>
def run_exit source · line 75 · raw
@-V:Data -> @intent:Intent<V> -> Bool
def run_transition source · line 79 · raw
@-V:Data -> @intent:Intent<V> -> Bool
def run_enter source · line 83 · raw
@-V:Data -> @intent:Intent<V> -> Bool
Templates
template empty source · line 16 · raw
@-S:Data -> @-K:Data -> @-V:Data -> Cell<S, K, V>
template queue source · line 27 · raw
@-S:Data -> @-K:Data -> @-V:Data -> @-same:(@_:V -> @_:V -> Bool) -> @cell:Cell<S, K, V> -> @request:0x704c77730661eff4309838fc738ef615/machine.QueueInput<V> -> Cell<S, K, V>
Next setters and pending consumption have their own actual write stamp: https://github.com/bevyengine/bevy/blob/ad678262ce53b5d142fe49ee5e08caff6f00ab60/crates/bevy_state/src/state/resources.rs#L197-L234
template request_stamped source · line 34 · raw
@-S:Data -> @-K:Data -> @-V:Data -> @tick:0x704c77730661eff4309838fc738ef615/change_tick.Tick -> @cell:Cell<S, K, V> -> Pair(Cell<S, K, V>, Unit)
template queued_at source · line 39 · raw
@-S:Data -> @-K:Data -> @-V:Data -> @-same:(@_:V -> @_:V -> Bool) -> @request:0x704c77730661eff4309838fc738ef615/machine.QueueInput<V> -> @tick:0x704c77730661eff4309838fc738ef615/change_tick.Tick -> @cell:Cell<S, K, V> -> Pair(Cell<S, K, V>, Unit)
template initialized source · line 42 · raw
@-S:Data -> @-K:Data -> @-V:Data -> @+value:V -> @+tick:0x704c77730661eff4309838fc738ef615/change_tick.Tick -> @stream:0x704c77730661eff4309838fc738ef615/execution_machine_stream.Store<V> -> @+sequence:Nat -> @namespace:Maybe<&2, U32> -> Cell<S, K, V>
template initialize source · line 44 · raw
@-S:Data -> @-K:Data -> @-V:Data -> @cell:Cell<S, K, V> -> @value:V -> @tick:0x704c77730661eff4309838fc738ef615/change_tick.Tick -> Cell<S, K, V>
template retained source · line 60 · raw
@-V:Data -> @equal:Bool -> @from:V -> @to:V -> V
Bevy commits State and emits StateTransitionEvent before phase schedules: https://github.com/bevyengine/bevy/blob/ad678262ce53b5d142fe49ee5e08caff6f00ab60/crates/bevy_state/src/state/transitions.rs#L138-L205 Comparator equality retains actual Current; exited/Previous/event use the requested value, including when equal values have different representations.
template exited source · line 64 · raw
@-V:Data -> @equal:Bool -> @from:V -> @to:V -> V
template committed source · line 68 · raw
@-S:Data -> @-K:Data -> @-V:Data -> @+from:V -> @+to:V -> @skipSame:Bool -> @stream:0x704c77730661eff4309838fc738ef615/execution_machine_stream.Store<V> -> @revision:Nat -> @stamp:Maybe<&2, 0x704c77730661eff4309838fc738ef615/change_tick.Tick> -> @+sequence:Nat -> @+tick:0x704c77730661eff4309838fc738ef615/change_tick.Tick -> @+equal:Bool -> @namespace:Maybe<&2, U32> -> Cell<S, K, V>
template apply source · line 70 · raw
@-S:Data -> @-K:Data -> @-V:Data -> @-same:(@_:V -> @_:V -> Bool) -> @cell:Cell<S, K, V> -> @tick:0x704c77730661eff4309838fc738ef615/change_tick.Tick -> Cell<S, K, V>
template matches source · line 88 · raw
@-S:Data -> @-K:Data -> @-V:Data -> @-same:(@_:V -> @_:V -> Bool) -> @value:V -> @view:View<S, K, V> -> Bool
template bind source · line 92 · raw
@-S:Data -> @-K:Data -> @-V:Data -> @namespace:U32 -> @cell:Cell<S, K, V> -> Cell<S, K, V>
template maintain source · line 96 · raw
@-S:Data -> @-K:Data -> @-V:Data -> @tick:0x704c77730661eff4309838fc738ef615/change_tick.Tick -> @cell:Cell<S, K, V> -> Cell<S, K, V>