pub trait MergeExternalSend<'a, E> {
type Item;
// Required method
fn merge_external_send(
self,
external_events: impl Stream<Item = E> + Unpin + Send + Sync + 'a,
) -> Box<dyn Stream<Item = Self::Item> + Unpin + Send + Sync + 'a>;
}
Expand description
Allows merging a sendable external event stream into an existing (sendable) event stream.
By implementing Send
, the streams can be sent to different threads.
Required Associated Types§
Required Methods§
Sourcefn merge_external_send(
self,
external_events: impl Stream<Item = E> + Unpin + Send + Sync + 'a,
) -> Box<dyn Stream<Item = Self::Item> + Unpin + Send + Sync + 'a>
fn merge_external_send( self, external_events: impl Stream<Item = E> + Unpin + Send + Sync + 'a, ) -> Box<dyn Stream<Item = Self::Item> + Unpin + Send + Sync + 'a>
Merge the given stream into an existing event stream.
Returns a new event stream that yields items from both streams. The ordering between the two streams is not guaranteed.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.