machine_stream.bend checks
raw source on the hub · import bendvy-ecs-core@0.1.0.5/machine_stream.bend as Machine_stream
4 imports
import Base import machine.bend as M import event_runtime.bend as Ev import machine_stream_queue.bend as Q
Types
type Stream source · line 7 · raw
@V:Data -> Data
FIFO metadata: front oldest-first, back newest-first; size counts events.
Stream@V:Data -> @queue:0x2a0aaf4f2cb3f416a9b91fd887916a5d/machine_stream_queue.Queue<0x2a0aaf4f2cb3f416a9b91fd887916a5d/machine.Transition<V>> -> @positions:List<&2, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/event_runtime.Position> -> @frameStart:Nat -> Stream<V>
type Reader source · line 9 · raw
@S:Data -> @M:Data -> Type
Reader@S:Data -> @M:Data -> @namespace:U32 -> @id:U32 -> Reader<S, M>
type OpenResult source · line 79 · raw
@S:Data -> @M:Data -> @V:Data -> Type
Engine entry points consume and return the real affine reader capability. A foreign-world refusal preserves both owners and never activates a cursor.
Opened@S:Data -> @M:Data -> @V:Data -> @reader:Reader<S, M> -> @stream:Stream<V> -> @reading:0x2a0aaf4f2cb3f416a9b91fd887916a5d/event_runtime.Reading<0x2a0aaf4f2cb3f416a9b91fd887916a5d/machine.Transition<V>> -> OpenResult<S, M, V>
ReaderRefused@S:Data -> @M:Data -> @V:Data -> @reader:Reader<S, M> -> @stream:Stream<V> -> OpenResult<S, M, V>
Templates
template empty source · line 12 · raw
@-V:Data -> Stream<V>
template publish source · line 13 · raw
@-V:Data -> @stream:Stream<V> -> @tick:Nat -> @event:0x2a0aaf4f2cb3f416a9b91fd887916a5d/machine.Transition<V> -> Stream<V>
template activate source · line 16 · raw
@-V:Data -> @stream:Stream<V> -> @id:U32 -> @tick:Nat -> Stream<V>
template complete source · line 19 · raw
@-V:Data -> @stream:Stream<V> -> @id:U32 -> @tick:Nat -> @success:Bool -> Stream<V>
template skip source · line 24 · raw
@-V:Data -> @stream:Stream<V> -> @id:U32 -> @tick:Nat -> Stream<V>
A condition-false system never executes its reader parameter.
template initial_queue source · line 28 · raw
@-V:Data -> @queue:0x2a0aaf4f2cb3f416a9b91fd887916a5d/machine_stream_queue.Queue<0x2a0aaf4f2cb3f416a9b91fd887916a5d/machine.Transition<V>> -> @tick:Nat -> @value:V -> 0x2a0aaf4f2cb3f416a9b91fd887916a5d/machine_stream_queue.Queue<0x2a0aaf4f2cb3f416a9b91fd887916a5d/machine.Transition<V>>
Bevy insert_state replaces messages while preserving reader positions and loss.
template initial source · line 31 · raw
@-V:Data -> @stream:Stream<V> -> @tick:Nat -> @value:V -> Stream<V>
template observe_position source · line 35 · raw
@-V:Data -> @position:Maybe<&1, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/event_runtime.Position> -> @batches:List<&2, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/event_runtime.Batch<0x2a0aaf4f2cb3f416a9b91fd887916a5d/machine.Transition<V>>> -> @dropped:Nat -> @id:U32 -> @tick:Nat -> 0x2a0aaf4f2cb3f416a9b91fd887916a5d/event_runtime.Reading<0x2a0aaf4f2cb3f416a9b91fd887916a5d/machine.Transition<V>>
template observe_registered source · line 40 · raw
@-V:Data -> @position:0x2a0aaf4f2cb3f416a9b91fd887916a5d/event_runtime.Position -> @+queue:0x2a0aaf4f2cb3f416a9b91fd887916a5d/machine_stream_queue.Queue<0x2a0aaf4f2cb3f416a9b91fd887916a5d/machine.Transition<V>> -> 0x2a0aaf4f2cb3f416a9b91fd887916a5d/event_runtime.Reading<0x2a0aaf4f2cb3f416a9b91fd887916a5d/machine.Transition<V>>
template observe_queue_position source · line 43 · raw
@-V:Data -> @position:Maybe<&1, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/event_runtime.Position> -> @queue:0x2a0aaf4f2cb3f416a9b91fd887916a5d/machine_stream_queue.Queue<0x2a0aaf4f2cb3f416a9b91fd887916a5d/machine.Transition<V>> -> @id:U32 -> @tick:Nat -> 0x2a0aaf4f2cb3f416a9b91fd887916a5d/event_runtime.Reading<0x2a0aaf4f2cb3f416a9b91fd887916a5d/machine.Transition<V>>
template observe source · line 47 · raw
@-V:Data -> @stream:Stream<V> -> @+id:U32 -> @tick:Nat -> 0x2a0aaf4f2cb3f416a9b91fd887916a5d/event_runtime.Reading<0x2a0aaf4f2cb3f416a9b91fd887916a5d/machine.Transition<V>>
template batches_into_queue source · line 50 · raw
@-V:Data -> @batches:List<&2, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/event_runtime.Batch<0x2a0aaf4f2cb3f416a9b91fd887916a5d/machine.Transition<V>>> -> @queue:0x2a0aaf4f2cb3f416a9b91fd887916a5d/machine_stream_queue.Queue<0x2a0aaf4f2cb3f416a9b91fd887916a5d/machine.Transition<V>> -> 0x2a0aaf4f2cb3f416a9b91fd887916a5d/machine_stream_queue.Queue<0x2a0aaf4f2cb3f416a9b91fd887916a5d/machine.Transition<V>>
template trimmed source · line 54 · raw
@-V:Data -> @frameStart:Nat -> @positions:List<&2, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/event_runtime.Position> -> @result:0x2a0aaf4f2cb3f416a9b91fd887916a5d/event_runtime.Trimmed<0x2a0aaf4f2cb3f416a9b91fd887916a5d/machine.Transition<V>> -> Stream<V>
template frame source · line 58 · raw
@-V:Data -> @stream:Stream<V> -> @tick:Nat -> Stream<V>
template dispose source · line 61 · raw
@-V:Data -> @stream:Stream<V> -> @id:U32 -> Stream<V>
template batches_loop source · line 66 · raw
@-V:Data -> @batches:List<&2, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/machine_stream_queue.Batch<0x2a0aaf4f2cb3f416a9b91fd887916a5d/machine.Transition<V>>> -> @acc:List<&2, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/event_runtime.Batch<0x2a0aaf4f2cb3f416a9b91fd887916a5d/machine.Transition<V>>> -> List<&2, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/event_runtime.Batch<0x2a0aaf4f2cb3f416a9b91fd887916a5d/machine.Transition<V>>>
Canonical snapshot includes every retained batch/payload, without changing cursor.
template snapshot_queue source · line 70 · raw
@-V:Data -> @queue:0x2a0aaf4f2cb3f416a9b91fd887916a5d/machine_stream_queue.Queue<0x2a0aaf4f2cb3f416a9b91fd887916a5d/machine.Transition<V>> -> @positions:List<&2, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/event_runtime.Position> -> @frameStart:Nat -> Pair(List<&2, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/event_runtime.Batch<0x2a0aaf4f2cb3f416a9b91fd887916a5d/machine.Transition<V>>>, Pair(List<&2, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/event_runtime.Position>, Pair(Nat, Nat)))
template snapshot source · line 73 · raw
@-V:Data -> @stream:Stream<V> -> Pair(List<&2, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/event_runtime.Batch<0x2a0aaf4f2cb3f416a9b91fd887916a5d/machine.Transition<V>>>, Pair(List<&2, 0x2a0aaf4f2cb3f416a9b91fd887916a5d/event_runtime.Position>, Pair(Nat, Nat)))
template open_checked source · line 83 · raw
@-S:Data -> @-M:Data -> @-V:Data -> @allowed:Bool -> @reader:Reader<S, M> -> @+stream:Stream<V> -> @+tick:Nat -> OpenResult<S, M, V>
template open source · line 89 · raw
@-S:Data -> @-M:Data -> @-V:Data -> @reader:Reader<S, M> -> @stream:Stream<V> -> @namespace:U32 -> @tick:Nat -> OpenResult<S, M, V>
template finish source · line 93 · raw
@-S:Data -> @-M:Data -> @-V:Data -> @reader:Reader<S, M> -> @stream:Stream<V> -> @tick:Nat -> @success:Bool -> Pair(Reader<S, M>, Stream<V>)
template skip_owned source · line 97 · raw
@-S:Data -> @-M:Data -> @-V:Data -> @reader:Reader<S, M> -> @stream:Stream<V> -> @tick:Nat -> Pair(Reader<S, M>, Stream<V>)