Lines Matching refs:T
29 pub struct Mutex<T> {
31 data: UnsafeCell<T>,
38 pub struct MutexGuard<'a, T: 'a> {
39 lock: &'a Mutex<T>,
42 unsafe impl<T> Sync for Mutex<T> where T: Send {}
44 impl<T> Mutex<T> {
47 pub const fn new(value: T) -> Self { in new()
61 pub fn lock(&self) -> MutexGuard<T> { in lock() argument
91 pub fn try_lock(&self) -> Result<MutexGuard<T>, i32> { in try_lock() argument
149 impl<T> Deref for MutexGuard<'_, T> {
150 type Target = T;
158 impl<T> DerefMut for MutexGuard<'_, T> {
165 impl<T> Drop for MutexGuard<'_, T> {