Enum std::sync::mpsc::TryRecvError 1.0.0[−][src]
pub enum TryRecvError {
Empty,
Disconnected,
}Expand description
该枚举是 try_recv 在调用时无法返回数据的可能原因的列表。
channel 和 sync_channel 都可能发生这种情况。
Variants
该 通道 当前为空,但 发送器 尚未断开连接,因此数据可能仍可用。
通道 的发送一半已断开,并且永远不会再收到任何数据。
Trait Implementations
👎 Deprecated since 1.42.0:
use the Display impl or to_string()
将 RecvError 转换为 TryRecvError。
此转换始终返回 TryRecvError::Disconnected。
没有在堆上分配数据。