pub trait Producer<T> {
fn sender_connector(&self) -> &SenderConnector<T>;
fn feed_into<C: Consumer<T>>(&self, consumer: &C) { ... }
fn connect_to_consumer<C: Consumer<T>>(&self, consumer: &C) { ... }
}
Expand description
Type which contains a SenderConnector
and can be connected to a
Consumer
This trait is implemented for SenderConnector
but may also be implemented
for structs which contain a SenderConnector
.
Required Methods
sourcefn sender_connector(&self) -> &SenderConnector<T>
fn sender_connector(&self) -> &SenderConnector<T>
Obtain reference to SenderConnector
Provided Methods
sourcefn connect_to_consumer<C: Consumer<T>>(&self, consumer: &C)
fn connect_to_consumer<C: Consumer<T>>(&self, consumer: &C)
👎Deprecated since 0.2.0: method has been renamed to
feed_into
Connect Producer
to Consumer