Type Definition reactive_messaging::prelude::ProcessorRemoteStreamType
source · pub type ProcessorRemoteStreamType<RemoteMessagesType> = MutinyStream<'static, RemoteMessagesType, ChannelUniZeroCopyAtomic<RemoteMessagesType, RECEIVER_BUFFER_SIZE, 1>, SocketProcessorDerivedType<RemoteMessagesType>>;Expand description
Type for the Stream we create when reading from the remote peer.
This type is intended to be used only for the first level of dialog_processor_builder()s you pass to
the [SocketClient] or [SocketServer], as Rust Generics isn’t able to infer a generic Stream type
in this situation (in which the Stream is created inside the generic function itself).
If your logic uses functions that receive Streams, you’ll want flexibility to do whatever you want
with the Stream (which would no longer be a MutinyStream), so declare such functions as:
fn dialog_processor<RemoteStreamType: Stream<Item=SocketProcessorDerivedType<RemoteMessages>>>
(remote_messages_stream: RemoteStreamType) -> impl Stream<Item=LocalMessages> { ... }