Enum std::sync::mpsc::RecvTimeoutError1.12.0[][src]

pub enum RecvTimeoutError {
    Timeout,
    Disconnected,
}
Expand description

该枚举是导致 recv_timeout 在调用时无法返回数据的可能错误的列表。 channelsync_channel 都可能发生这种情况。

Variants

Timeout

通道 当前为空,但 发送器 尚未断开连接,因此数据可能仍可用。

Disconnected

通道 的发送一半已断开,并且永远不会再收到任何数据。

Trait Implementations

返回值的副本。 Read more

source 执行复制分配。 Read more

使用给定的格式化程序格式化该值。 Read more

使用给定的格式化程序格式化该值。 Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

此错误的下级来源 (如果有)。 Read more

🔬 This is a nightly-only experimental API. (backtrace #53487)

返回发生错误的栈回溯 (如果有)。 Read more

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

RecvError 转换为 RecvTimeoutError

此转换始终返回 RecvTimeoutError::Disconnected

没有在堆上分配数据。

此方法测试 selfother 值是否相等,并由 == 使用。 Read more

此方法测试 !=

Auto Trait Implementations

Blanket Implementations

获取 selfTypeIdRead more

从拥有的值中一成不变地借用。 Read more

从拥有的值中借用。 Read more

执行转换。

执行转换。

获得所有权后的结果类型。

通常通过克隆从借用数据中创建拥有的数据。 Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into #41263)

recently added

使用借来的数据来替换拥有的数据,通常是通过克隆。 Read more

将给定值转换为 StringRead more

发生转换错误时返回的类型。

执行转换。

发生转换错误时返回的类型。

执行转换。