Lines Matching refs:T
5 pub struct Mutex<T>(sync::Mutex<T>);
7 impl<T> Mutex<T> {
9 pub fn new(value: T) -> Self { in new()
14 pub fn lock(&self) -> MutexGuard<'_, T> { in lock() argument
21 pub fn into_inner(self) -> T { in into_inner() argument
28 pub struct MutexGuard<'a, T>(sync::MutexGuard<'a, T>);
30 impl<'a, T> ops::Deref for MutexGuard<'a, T> {
31 type Target = T;
38 impl<'a, T> ops::DerefMut for MutexGuard<'a, T> {
46 pub struct RwLock<T>(sync::RwLock<T>);
48 impl<T> RwLock<T> {
50 pub fn new(value: T) -> Self { in new()
56 pub fn read(&self) -> RwLockReadGuard<'_, T> { in read() argument
64 pub fn write(&self) -> RwLockWriteGuard<'_, T> { in write() argument
73 pub struct RwLockReadGuard<'a, T>(sync::RwLockReadGuard<'a, T>);
75 impl<'a, T> ops::Deref for RwLockReadGuard<'a, T> {
76 type Target = T;
85 pub struct RwLockWriteGuard<'a, T>(sync::RwLockWriteGuard<'a, T>);
87 impl<'a, T> ops::Deref for RwLockWriteGuard<'a, T> {
88 type Target = T;
95 impl<'a, T> ops::DerefMut for RwLockWriteGuard<'a, T> {