Lines Matching refs:T
29 pub struct RwLock<T> {
31 data: UnsafeCell<T>,
36 pub struct RwLockReadGuard<'a, T: 'a> {
37 data: *const T,
44 pub struct RwLockUpgradableGuard<'a, T: 'a> {
45 data: *const T,
46 inner: &'a RwLock<T>,
52 pub struct RwLockWriteGuard<'a, T: 'a> {
53 data: *mut T,
54 inner: &'a RwLock<T>,
82 pub const fn new(data: T) -> Self
86 pub fn read(&self) -> RwLockReadGuard<T>
90 pub fn try_read(&self) -> Option<RwLockReadGuard<T>>
94 pub fn write(&self) -> RwLockWriteGuard<T>
98 pub fn try_write(&self) -> Option<RwLockWriteGuard<T>>
102 pub fn upgradeable_read(&self) -> RwLockUpgradableGuard<T>
106 pub fn try_upgradeable_read(&self) -> Option<RwLockUpgradableGuard<T>>
111 pub fn downgrade(self) -> RwLockReadGuard<'rwlock, T>
115 pub fn downgrade_to_upgradeable(self) -> RwLockUpgradableGuard<'rwlock, T>
120 pub fn upgrade(mut self) -> RwLockWriteGuard<'rwlock, T>
124 pub fn downgrade(self) -> RwLockReadGuard<'rwlock, T>