@@ -7,6 +7,7 @@ use crate::{error, fmt};
7
7
///
8
8
/// [`send_timeout`]: super::Sender::send_timeout
9
9
#[ derive( PartialEq , Eq , Clone , Copy ) ]
10
+ #[ unstable( feature = "mpmc_channel" , issue = "126840" ) ]
10
11
pub enum SendTimeoutError < T > {
11
12
/// The message could not be sent because the channel is full and the operation timed out.
12
13
///
@@ -18,12 +19,14 @@ pub enum SendTimeoutError<T> {
18
19
Disconnected ( T ) ,
19
20
}
20
21
22
+ #[ unstable( feature = "mpmc_channel" , issue = "126840" ) ]
21
23
impl < T > fmt:: Debug for SendTimeoutError < T > {
22
24
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
23
25
"SendTimeoutError(..)" . fmt ( f)
24
26
}
25
27
}
26
28
29
+ #[ unstable( feature = "mpmc_channel" , issue = "126840" ) ]
27
30
impl < T > fmt:: Display for SendTimeoutError < T > {
28
31
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
29
32
match * self {
@@ -33,8 +36,10 @@ impl<T> fmt::Display for SendTimeoutError<T> {
33
36
}
34
37
}
35
38
39
+ #[ unstable( feature = "mpmc_channel" , issue = "126840" ) ]
36
40
impl < T > error:: Error for SendTimeoutError < T > { }
37
41
42
+ #[ unstable( feature = "mpmc_channel" , issue = "126840" ) ]
38
43
impl < T > From < SendError < T > > for SendTimeoutError < T > {
39
44
fn from ( err : SendError < T > ) -> SendTimeoutError < T > {
40
45
match err {
0 commit comments