pub struct ShareSync;Expand description
A thread-safe ShareKind
Trait Implementations§
Source§type Inner<T> = Arc<RwLock<RawRwLock, T>>
type Inner<T> = Arc<RwLock<RawRwLock, T>>
The inner wrapper, usually a smart pointer wrapping something with interior mutability
Source§fn read<T>(
inner: &Self::Inner<T>,
) -> <Self::GuardKind as GuardKind>::ReadGuard<'_, T>
fn read<T>( inner: &Self::Inner<T>, ) -> <Self::GuardKind as GuardKind>::ReadGuard<'_, T>
Get a read-only guard to the value
Source§fn write<T>(
inner: &mut Self::Inner<T>,
) -> <Self::GuardKind as GuardKind>::WriteGuard<'_, T>
fn write<T>( inner: &mut Self::Inner<T>, ) -> <Self::GuardKind as GuardKind>::WriteGuard<'_, T>
Get a read-write guard to the value
Source§fn try_read<T>(
inner: &Self::Inner<T>,
) -> Option<<Self::GuardKind as GuardKind>::ReadGuard<'_, T>>
fn try_read<T>( inner: &Self::Inner<T>, ) -> Option<<Self::GuardKind as GuardKind>::ReadGuard<'_, T>>
Try to get a read-only guard to the value
Source§fn try_write<T>(
inner: &mut Self::Inner<T>,
) -> Option<<Self::GuardKind as GuardKind>::WriteGuard<'_, T>>
fn try_write<T>( inner: &mut Self::Inner<T>, ) -> Option<<Self::GuardKind as GuardKind>::WriteGuard<'_, T>>
Try to get a read-write guard to the value
Source§fn as_mut<T>(inner: &mut Self::Inner<T>) -> Option<&mut T>
fn as_mut<T>(inner: &mut Self::Inner<T>) -> Option<&mut T>
Try to get a mutable reference to the value Read more
Source§fn try_unwrap<T>(inner: Self::Inner<T>) -> Result<T, Self::Inner<T>>
fn try_unwrap<T>(inner: Self::Inner<T>) -> Result<T, Self::Inner<T>>
Try to unwrap the inner value
Source§fn ptr_eq<T, U>(a: &Self::Inner<T>, b: &Self::Inner<U>) -> bool
fn ptr_eq<T, U>(a: &Self::Inner<T>, b: &Self::Inner<U>) -> bool
Compare two inner values for pointer equality
Source§fn ptr_cmp<T, U>(a: &Self::Inner<T>, b: &Self::Inner<U>) -> Ordering
fn ptr_cmp<T, U>(a: &Self::Inner<T>, b: &Self::Inner<U>) -> Ordering
Compare two inner values for pointer ordering
Auto Trait Implementations§
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