pub fn spawn_listener<T, F, S, I, E>(
handle: GenServerHandle<T>,
message_builder: F,
stream: S,
) -> JoinHandle<()>Expand description
Spawns a listener that listens to a stream and sends messages to a GenServer.
Items sent through the stream are required to be wrapped in a Result type.
This function returns a handle to the spawned task and a cancellation token to stop it.