spawned_concurrency/threads/
stream.rs

1use crate::threads::{GenServer, GenServerHandle};
2
3use futures::Stream;
4
5/// Spawns a listener that listens to a stream and sends messages to a GenServer.
6///
7/// Items sent through the stream are required to be wrapped in a Result type.
8pub fn spawn_listener<T, F, S, I, E>(_handle: GenServerHandle<T>, _message_builder: F, _stream: S)
9where
10    T: GenServer + 'static,
11    F: Fn(I) -> T::CastMsg + Send + 'static,
12    I: Send + 'static,
13    E: std::fmt::Debug + Send + 'static,
14    S: Unpin + Send + Stream<Item = Result<I, E>> + 'static,
15{
16    unimplemented!("Unsupported function in threads mode")
17}