pub struct DriverMutexAny { /* private fields */ }Expand description
A type-erased reference to a resource guarded by a DriverMutex
See DriverMutexClient for an explanation of how/why DriverMutexAny should be used.
Implementations§
Source§impl DriverMutexAny
impl DriverMutexAny
Sourcepub fn downcast<T>(self) -> Result<DriverMutexRef<T>, Self>
pub fn downcast<T>(self) -> Result<DriverMutexRef<T>, Self>
Converts this guard to a guard for the concrete resource type T.
On a type mismatch, returns the original guard without releasing the mutex.
Trait Implementations§
Source§impl Drop for DriverMutexAny
impl Drop for DriverMutexAny
Auto Trait Implementations§
impl !RefUnwindSafe for DriverMutexAny
impl !Send for DriverMutexAny
impl !Sync for DriverMutexAny
impl !UnwindSafe for DriverMutexAny
impl Freeze for DriverMutexAny
impl Unpin for DriverMutexAny
impl UnsafeUnpin for DriverMutexAny
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