Struct std::sync::MutexGuard1.0.0[−][src]

#[must_use = "if unused the Mutex will immediately unlock"]
pub struct MutexGuard<'a, T: ?Sized + 'a> { /* fields omitted */ }
Expand description

互斥锁的 “scoped lock” 的 RAII 实现。 当此结构体被丢弃 (离开作用域) 时,这个锁将被解锁。

可以通过此防护程序通过其 Deref 和 DerefMut 实现来访问受互斥锁保护的数据。

该结构体由 Mutex 上的 lock 和 try_lock 方法创建。

Trait Implementations

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

解引用后的结果类型。

解引用值。

可变地解引用该值。

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

执行此类型的析构函数。 Read more

Auto Trait Implementations

Blanket Implementations

获取 self 的 TypeId。 Read more

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

从拥有的值中借用。 Read more

执行转换。

执行转换。

将给定值转换为 String。 Read more

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

执行转换。

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

执行转换。