diff options
| author | Obei Sideg <obei.sideg@gmail.com> | 2024-06-22 22:17:57 +0300 |
|---|---|---|
| committer | Obei Sideg <obei.sideg@gmail.com> | 2024-09-30 20:43:51 +0300 |
| commit | 041e76b7cd7c499837fcea63f7f780fdf774a1a5 (patch) | |
| tree | cf02aa73925535ad87bbee748168c8c2578f08bd /library/std/src/sync/mpmc/error.rs | |
| parent | 0245b0ca1eb9ea5da02b948bfe65b459ba8e1beb (diff) | |
| download | rust-041e76b7cd7c499837fcea63f7f780fdf774a1a5.tar.gz rust-041e76b7cd7c499837fcea63f7f780fdf774a1a5.zip | |
Add multi-producer, multi-consumer channel (mpmc)
Diffstat (limited to 'library/std/src/sync/mpmc/error.rs')
| -rw-r--r-- | library/std/src/sync/mpmc/error.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/library/std/src/sync/mpmc/error.rs b/library/std/src/sync/mpmc/error.rs index e3aec7e7623..e34b56d0831 100644 --- a/library/std/src/sync/mpmc/error.rs +++ b/library/std/src/sync/mpmc/error.rs @@ -7,6 +7,7 @@ use crate::{error, fmt}; /// /// [`send_timeout`]: super::Sender::send_timeout #[derive(PartialEq, Eq, Clone, Copy)] +#[unstable(feature = "mpmc_channel", issue = "126840")] pub enum SendTimeoutError<T> { /// The message could not be sent because the channel is full and the operation timed out. /// @@ -18,12 +19,14 @@ pub enum SendTimeoutError<T> { Disconnected(T), } +#[unstable(feature = "mpmc_channel", issue = "126840")] impl<T> fmt::Debug for SendTimeoutError<T> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { "SendTimeoutError(..)".fmt(f) } } +#[unstable(feature = "mpmc_channel", issue = "126840")] impl<T> fmt::Display for SendTimeoutError<T> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match *self { @@ -33,8 +36,10 @@ impl<T> fmt::Display for SendTimeoutError<T> { } } +#[unstable(feature = "mpmc_channel", issue = "126840")] impl<T> error::Error for SendTimeoutError<T> {} +#[unstable(feature = "mpmc_channel", issue = "126840")] impl<T> From<SendError<T>> for SendTimeoutError<T> { fn from(err: SendError<T>) -> SendTimeoutError<T> { match err { |
