The type of values that can be received.
Readonly[toThe well-known symbol Symbol.toStringTag used by Object.prototype.toString().
Returns 'Receiver' so that Object.prototype.toString.call(receiver) produces '[object Receiver]'.
ReadonlycapacityThe maximum number of values that can be buffered.
0 for rendezvous channels, Infinity for unbounded channels.
ReadonlyisReturns true if the channel has been closed.
ReadonlyisReturns true if the channel buffer is empty.
Note: A rendezvous channel (capacity=0) is always empty.
ReadonlyisReturns true if the channel buffer is full.
Note: A rendezvous channel (capacity=0) is always full.
ReadonlylengthThe current number of values in the buffer.
Note: This does not count waiting senders/receivers; it only counts buffered items.
Returns an async iterator that yields values until the channel is closed.
The returned iterator is itself async-iterable and implements the full
iterator protocol, including return(): leaving early — a break, an
error raised in the loop body, or an explicit iterator.return() —
cancels any in-flight next() so it no longer holds a spot in the
receive queue and cannot swallow a message intended for another consumer.
Note that a bare receive()/send() returns an ordinary promise that
cannot be cancelled. If such a promise is abandoned while pending, it
still occupies the queue and will consume the next message — prefer
for await (or an explicit iterator.return()) when you may stop early.
Receives a value from the channel, waiting if necessary.
Some(value) immediately.None.A promise that resolves to Some(value) or None if closed and empty.
Receives a value from the channel with a timeout.
Like receive(), but returns None if the operation cannot complete
within the specified timeout.
Timeout in milliseconds.
A promise that resolves to Some(value) or None if timed out,
empty, or closed.
A receiver view of a channel that can only receive values.
Obtained from the
receiverproperty of aChannel. Shares state with the parent channel. ImplementsAsyncIterablefor use withfor await...of.See
https://doc.rust-lang.org/std/sync/mpmc/struct.Receiver.html
Since
1.8.0