pub struct ArcRefMut<T: ?Sized, C: ?Sized = T> { /* private fields */ }Expand description
A wrapper type for a mutably borrowed value from an ArcRefCell<T>.
Implementations§
Trait Implementations§
Source§impl<T: ?Sized, C: ?Sized> NonBlockingGuardedBorrow<T> for ArcRefMut<T, C>
impl<T: ?Sized, C: ?Sized> NonBlockingGuardedBorrow<T> for ArcRefMut<T, C>
Source§type Guard<'a> = &'a T
where
T: 'a,
Self: 'a
type Guard<'a> = &'a T where T: 'a, Self: 'a
The guard type (for example,
std::cell::Ref<'a, T>.)Source§type BorrowError<'a> = Infallible
where
T: 'a,
Self: 'a
type BorrowError<'a> = Infallible where T: 'a, Self: 'a
The type returned in the case the value cannot be borrowed.
Source§fn try_nonblocking_guarded_borrow(
&self,
) -> Result<Self::Guard<'_>, Self::BorrowError<'_>>
fn try_nonblocking_guarded_borrow( &self, ) -> Result<Self::Guard<'_>, Self::BorrowError<'_>>
Attempt to perform the borrow.
Source§impl<T: ?Sized, C: ?Sized> NonBlockingGuardedMutBorrowMut<T> for ArcRefMut<T, C>
impl<T: ?Sized, C: ?Sized> NonBlockingGuardedMutBorrowMut<T> for ArcRefMut<T, C>
Source§type MutGuardMut<'a> = &'a mut T
where
T: 'a,
Self: 'a
type MutGuardMut<'a> = &'a mut T where T: 'a, Self: 'a
The guard type (for example,
std::sync::RwLockWriteGuard<'a, T>.)Source§type MutBorrowMutError<'a> = Infallible
where
T: 'a,
Self: 'a
type MutBorrowMutError<'a> = Infallible where T: 'a, Self: 'a
The type returned in the case the value cannot be borrowed.
Source§fn try_nonblocking_guarded_mut_borrow_mut(
&mut self,
) -> Result<Self::MutGuardMut<'_>, Self::MutBorrowMutError<'_>>
fn try_nonblocking_guarded_mut_borrow_mut( &mut self, ) -> Result<Self::MutGuardMut<'_>, Self::MutBorrowMutError<'_>>
Attempt to perform the borrow.
impl<T: Send + Sync, C: ?Sized + Send + Sync> Send for ArcRefMut<T, C>
impl<T: Send + Sync, C: ?Sized> Sync for ArcRefMut<T, C>
Auto Trait Implementations§
impl<T, C> Freeze for ArcRefMut<T, C>
impl<T, C = T> !RefUnwindSafe for ArcRefMut<T, C>
impl<T, C> Unpin for ArcRefMut<T, C>
impl<T, C = T> !UnwindSafe for ArcRefMut<T, C>
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