rstd 0.1.0
Loading...
Searching...
No Matches
rstd::sync::mpsc::Sender< T > Class Template Referenceexport
module rstd

The sending half of an asynchronous (unbounded) channel. More...

Public Member Functions

auto send (T msg) -> Result< empty, T >
 Sends a value on this channel, returning Err(msg) if the receiver has disconnected.
 

Detailed Description

template<typename T>
class rstd::sync::mpsc::Sender< T >

The sending half of an asynchronous (unbounded) channel.

Senders can be cloned to send from multiple threads.

Template Parameters
TThe type of values sent through the channel.

Member Function Documentation

◆ send()

template<typename T >
auto rstd::sync::mpsc::Sender< T >::send ( T msg) -> Result<empty, T>
inlineexport

Sends a value on this channel, returning Err(msg) if the receiver has disconnected.

Parameters
msgThe message to send.

The documentation for this class was generated from the following file: