pub struct RefGuard<'a, V> { /* private fields */ }Expand description
Read guard without value lock, only structure lock (read-only access) 无值锁的读守护者,只有结构锁(只读访问)
§Safety
此结构绕过了保护值的 RwLock,仅当您确定没有其他线程正在修改该值时才应使用。
This struct bypasses the RwLock protecting the value.
It should only be used when you are sure that no other thread is modifying the value.
Trait Implementations§
impl<'a, V> Eq for RefGuard<'a, V>where
V: Eq,
Auto Trait Implementations§
impl<'a, V> Freeze for RefGuard<'a, V>
impl<'a, V> RefUnwindSafe for RefGuard<'a, V>where
V: RefUnwindSafe,
impl<'a, V> Send for RefGuard<'a, V>where
V: Sync,
impl<'a, V> Sync for RefGuard<'a, V>where
V: Sync,
impl<'a, V> Unpin for RefGuard<'a, V>
impl<'a, V> UnwindSafe for RefGuard<'a, V>where
V: RefUnwindSafe,
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more