pub struct AnonymousStream<S: StreamEffect>(/* private fields */);Expand description
A wrapper to turn any StreamEffect into an anonymous (unnamed) stream.
This should be used if you want a stream with the same behavior as StreamOf
but with some additional side effect. The input and output data types of the
stream may be different.
Trait Implementations§
Source§impl<S: StreamEffect> StreamEffect for AnonymousStream<S>
impl<S: StreamEffect> StreamEffect for AnonymousStream<S>
type Input = <S as StreamEffect>::Input
type Output = <S as StreamEffect>::Output
Source§fn side_effect(
input: Self::Input,
request: &mut StreamRequest<'_>,
) -> Result<Self::Output, OperationError>
fn side_effect( input: Self::Input, request: &mut StreamRequest<'_>, ) -> Result<Self::Output, OperationError>
Specify a side effect that is meant to happen whenever a stream value is
sent.
Source§impl<S: StreamEffect> StreamPack for AnonymousStream<S>
impl<S: StreamEffect> StreamPack for AnonymousStream<S>
type StreamInputPack = InputSlot<<S as StreamEffect>::Input>
type StreamOutputPack = Output<<S as StreamEffect>::Output>
type StreamReceivers = UnboundedReceiver<<S as StreamEffect>::Output>
type StreamChannels = StreamChannel<S>
type StreamBuffers = StreamBuffer<<S as StreamEffect>::Input>
fn spawn_scope_streams( in_scope: Entity, out_scope: Entity, commands: &mut Commands<'_, '_>, ) -> (InputSlot<S::Input>, Output<S::Output>)
fn spawn_workflow_streams( builder: &mut Builder<'_, '_, '_>, ) -> InputSlot<S::Input>
fn spawn_node_streams( source: Entity, map: &mut StreamTargetMap, builder: &mut Builder<'_, '_, '_>, ) -> Output<S::Output>
fn take_streams( source: Entity, map: &mut StreamTargetMap, commands: &mut Commands<'_, '_>, ) -> Receiver<S::Output>
fn collect_streams( source: Entity, target: Entity, map: &mut StreamTargetMap, commands: &mut Commands<'_, '_>, )
fn make_stream_channels( inner: &Arc<InnerChannel>, world: &World, ) -> Self::StreamChannels
fn make_stream_buffers( target_map: Option<&StreamTargetMap>, ) -> StreamBuffer<S::Input>
fn process_stream_buffers( buffer: Self::StreamBuffers, source: Entity, session: Entity, unused: &mut UnusedStreams, world: &mut World, roster: &mut OperationRoster, ) -> OperationResult
fn defer_buffers( buffer: Self::StreamBuffers, source: Entity, session: Entity, commands: &mut Commands<'_, '_>, )
fn set_stream_availability(availability: &mut StreamAvailability)
fn are_streams_available(availability: &StreamAvailability) -> bool
fn into_dyn_stream_input_pack( pack: &mut DynStreamInputPack, inputs: Self::StreamInputPack, )
fn into_dyn_stream_output_pack( pack: &mut DynStreamOutputPack, outputs: Self::StreamOutputPack, )
Source§fn has_streams() -> bool
fn has_streams() -> bool
Are there actually any streams in the pack?
Auto Trait Implementations§
impl<S> Freeze for AnonymousStream<S>
impl<S> RefUnwindSafe for AnonymousStream<S>
impl<S> Send for AnonymousStream<S>
impl<S> Sync for AnonymousStream<S>
impl<S> Unpin for AnonymousStream<S>
impl<S> UnwindSafe for AnonymousStream<S>
Blanket Implementations§
Source§impl<Source> AccessAs for Source
impl<Source> AccessAs for Source
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request