diff options
author | bors <bors@rust-lang.org> | 2024-10-01 13:35:16 +0000 |
---|---|---|
committer | bors <bors@rust-lang.org> | 2024-10-01 13:35:16 +0000 |
commit | 8dd5cd0bc1d683c30805e1dc831cac546b621a75 (patch) | |
tree | e35889870b1424b48f22796b6797d1276b8bfa87 /library/std/src/sync/mpmc/error.rs | |
parent | c4f7176501a7d3c19c230b8c9111b2d39142f83a (diff) | |
parent | 041e76b7cd7c499837fcea63f7f780fdf774a1a5 (diff) |
Add multi-producer, multi-consumer channel (mpmc)
Closes #125712
Tracking issue: #126840
r? m-ou-se
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 { |