pub struct MonitorReadGuard<'mutex, T: ?Sized + 'mutex> { /* private fields */ }
Expand description
A shared read guard to the data in a Monitor.
Implementations§
Source§impl<'mutex, T: ?Sized> MonitorReadGuard<'mutex, T>
impl<'mutex, T: ?Sized> MonitorReadGuard<'mutex, T>
Sourcepub fn wait_for_read(self) -> LockResult<Self>
pub fn wait_for_read(self) -> LockResult<Self>
Wait for a notification on the monitor, then resume with another read guard.
Sourcepub fn wait_for_write(self) -> LockResult<MonitorWriteGuard<'mutex, T>>
pub fn wait_for_write(self) -> LockResult<MonitorWriteGuard<'mutex, T>>
Wait for a notification on the monitor, then resume with a write guard.
Sourcepub fn notify_one(&self)
pub fn notify_one(&self)
Notify a thread waiting on the monitor.
Sourcepub fn notify_all(&self)
pub fn notify_all(&self)
Notify all threads waiting on the monitor.
Trait Implementations§
Source§impl<'mutex, T: ?Sized> Deref for MonitorReadGuard<'mutex, T>
impl<'mutex, T: ?Sized> Deref for MonitorReadGuard<'mutex, T>
Source§fn into(self) -> SharedMutexReadGuard<'mutex, T>
fn into(self) -> SharedMutexReadGuard<'mutex, T>
Converts this type into the (usually inferred) input type.
Auto Trait Implementations§
impl<'mutex, T> Freeze for MonitorReadGuard<'mutex, T>where
T: ?Sized,
impl<'mutex, T> !RefUnwindSafe for MonitorReadGuard<'mutex, T>
impl<'mutex, T> Send for MonitorReadGuard<'mutex, T>
impl<'mutex, T> Sync for MonitorReadGuard<'mutex, T>
impl<'mutex, T> Unpin for MonitorReadGuard<'mutex, T>where
T: ?Sized,
impl<'mutex, T> !UnwindSafe for MonitorReadGuard<'mutex, T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more