Skip to main content

Module oneshot

Module oneshot 

Source
๐Ÿ”ฌThis is a nightly-only experimental API. (oneshot_channel #143674)
Expand description

A single-producer, single-consumer (oneshot) channel.

This is an experimental module, so the API will likely change.

Re-exportsยง

use crate::sync::mpmc; ๐Ÿ”’ Experimental
use crate::sync::mpsc::RecvError; ๐Ÿ”’
use crate::sync::mpsc::SendError; ๐Ÿ”’
use crate::time::Duration; ๐Ÿ”’
use crate::time::Instant; ๐Ÿ”’
use crate::error; ๐Ÿ”’
use crate::fmt; ๐Ÿ”’

Structsยง

ReceiverExperimental
The receiving half of a oneshot channel.
SenderExperimental
The sending half of a oneshot channel.

Enumsยง

RecvTimeoutErrorExperimental
An error returned from the recv_timeout or recv_deadline methods.
TryRecvErrorExperimental
An error returned from the try_recv method.

Functionsยง

channelExperimental
Creates a new oneshot channel, returning the sender/receiver halves.