pub trait TryGuardedMut<T>: GuardedMut<T>where
T: ?Sized,{
type Error<'a>: Debug
where Self: 'a;
// Required method
fn try_get_mut<'a>(&'a self) -> Result<Self::GuardMut<'a>, Self::Error<'a>>;
}Required Associated Types§
Required Methods§
fn try_get_mut<'a>(&'a self) -> Result<Self::GuardMut<'a>, Self::Error<'a>>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
Implementations on Foreign Types§
Source§impl<T> TryGuardedMut<T> for RefCell<T>
Available on crate feature std only.
impl<T> TryGuardedMut<T> for RefCell<T>
Available on crate feature
std only.type Error<'a> = BorrowMutError where RefCell<T>: 'a
fn try_get_mut<'a>( &'a self, ) -> Result<<RefCell<T> as GuardedMut<T>>::GuardMut<'a>, <RefCell<T> as TryGuardedMut<T>>::Error<'a>>
Source§impl<T> TryGuardedMut<T> for Mutex<T>
Available on crate feature std only.
impl<T> TryGuardedMut<T> for Mutex<T>
Available on crate feature
std only.type Error<'a> = PoisonError<MutexGuard<'a, T>> where Mutex<T>: 'a
fn try_get_mut<'a>( &'a self, ) -> Result<<Mutex<T> as GuardedMut<T>>::GuardMut<'a>, <Mutex<T> as TryGuardedMut<T>>::Error<'a>>
Source§impl<T> TryGuardedMut<T> for RwLock<T>
Available on crate feature std only.
impl<T> TryGuardedMut<T> for RwLock<T>
Available on crate feature
std only.