Struct webrtc_util::sync::RwLock
source · pub struct RwLock<T>(_);
Expand description
A synchronous reader-writer lock.
Implementations
sourceimpl<T> RwLock<T>
impl<T> RwLock<T>
sourcepub fn read(&self) -> RwLockReadGuard<'_, T>
pub fn read(&self) -> RwLockReadGuard<'_, T>
Locks this rwlock with shared read access, blocking the current thread until it can be acquired.
sourcepub fn write(&self) -> RwLockWriteGuard<'_, T>
pub fn write(&self) -> RwLockWriteGuard<'_, T>
Locks this rwlock with exclusive write access, blocking the current thread until it can be acquired.
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for RwLock<T>
impl<T> Send for RwLock<T>where
T: Send,
impl<T> Sync for RwLock<T>where
T: Send + Sync,
impl<T> Unpin for RwLock<T>where
T: Unpin,
impl<T> UnwindSafe for RwLock<T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more