17
17
18
18
use bevy:: prelude:: { Component , Bundle , Entity , Commands , World } ;
19
19
20
+ use crossbeam:: channel:: Receiver ;
21
+
20
22
use crate :: {
21
23
InputSlot , Output , UnusedTarget , RedirectWorkflowStream , RedirectScopeStream ,
22
24
AddOperation , OperationRoster , OperationResult , OrBroken , ManageInput ,
@@ -118,6 +120,7 @@ pub trait StreamPack: 'static + Send + Sync {
118
120
type StreamStorageBundle : Bundle ;
119
121
type StreamInputPack ;
120
122
type StreamOutputPack ;
123
+ type Receiver ;
121
124
122
125
fn spawn_scope_streams ( scope : Entity , commands : & mut Commands ) -> (
123
126
Self :: StreamStorageBundle ,
@@ -140,6 +143,7 @@ impl<T: Stream> StreamPack for T {
140
143
type StreamStorageBundle = StreamTargetStorage < Self > ;
141
144
type StreamInputPack = InputSlot < Self > ;
142
145
type StreamOutputPack = Output < Self > ;
146
+ type Receiver = Receiver < Self > ;
143
147
144
148
fn spawn_scope_streams ( scope : Entity , commands : & mut Commands ) -> (
145
149
Self :: StreamStorageBundle ,
@@ -168,6 +172,7 @@ impl StreamPack for () {
168
172
type StreamStorageBundle = ( ) ;
169
173
type StreamInputPack = ( ) ;
170
174
type StreamOutputPack = ( ) ;
175
+ type Receiver = ( ) ;
171
176
172
177
fn spawn_scope_streams ( _: Entity , _: & mut Commands ) -> (
173
178
Self :: StreamStorageBundle ,
@@ -196,6 +201,7 @@ impl<T1: StreamPack> StreamPack for (T1,) {
196
201
type StreamStorageBundle = T1 :: StreamStorageBundle ;
197
202
type StreamInputPack = T1 :: StreamInputPack ;
198
203
type StreamOutputPack = T1 :: StreamOutputPack ;
204
+ type Receiver = T1 :: Receiver ;
199
205
200
206
fn spawn_scope_streams ( scope : Entity , commands : & mut Commands ) -> (
201
207
Self :: StreamStorageBundle ,
@@ -224,6 +230,7 @@ impl<T1: StreamPack, T2: StreamPack> StreamPack for (T1, T2) {
224
230
type StreamStorageBundle = ( T1 :: StreamStorageBundle , T2 :: StreamStorageBundle ) ;
225
231
type StreamInputPack = ( T1 :: StreamInputPack , T2 :: StreamInputPack ) ;
226
232
type StreamOutputPack = ( T1 :: StreamOutputPack , T2 :: StreamOutputPack ) ;
233
+ type Receiver = ( T1 :: Receiver , T2 :: Receiver ) ;
227
234
228
235
fn spawn_scope_streams ( scope : Entity , commands : & mut Commands ) -> (
229
236
Self :: StreamStorageBundle ,
@@ -258,6 +265,7 @@ impl<T1: StreamPack, T2: StreamPack, T3: StreamPack> StreamPack for (T1, T2, T3)
258
265
type StreamStorageBundle = ( T1 :: StreamStorageBundle , T2 :: StreamStorageBundle , T3 :: StreamStorageBundle ) ;
259
266
type StreamInputPack = ( T1 :: StreamInputPack , T2 :: StreamInputPack , T3 :: StreamInputPack ) ;
260
267
type StreamOutputPack = ( T1 :: StreamOutputPack , T2 :: StreamOutputPack , T3 :: StreamOutputPack ) ;
268
+ type Receiver = ( T1 :: Receiver , T2 :: Receiver , T3 :: Receiver ) ;
261
269
262
270
fn spawn_scope_streams ( scope : Entity , commands : & mut Commands ) -> (
263
271
Self :: StreamStorageBundle ,
0 commit comments