The receiving half of a channel, used to receive messages sent by Sender or SyncSender.
More...
|
| auto | recv () -> Result< T, empty > |
| | Blocks the current thread until a message is received or the channel is disconnected.
|
| |
| auto | try_recv () -> Result< T, empty > |
| | Attempts to receive a message without blocking.
|
| |
template<typename T>
class rstd::sync::mpsc::Receiver< T >
The receiving half of a channel, used to receive messages sent by Sender or SyncSender.
- Template Parameters
-
| T | The type of values received through the channel. |
◆ recv()
Blocks the current thread until a message is received or the channel is disconnected.
- Returns
- Ok(value) on success, or Err on disconnection.
◆ try_recv()
Attempts to receive a message without blocking.
- Returns
- Ok(value) if a message was available, or Err if the channel is empty or disconnected.
The documentation for this class was generated from the following file:
- /home/runner/work/rstd/rstd/src/std/sync/mpsc/mod.cppm