Lines Matching refs:T
28 pub struct Lazy<T> {
32 value: UnsafeCell<MaybeUninit<T>>,
37 impl<T> Lazy<T> {
40 pub const fn new() -> Lazy<T> { in new()
68 pub fn init(&self, value: T) { in init() argument
86 pub fn get(&self) -> &T { in get() argument
93 pub fn try_get(&self) -> Option<&T> { in try_get() argument
104 pub fn get_mut(&mut self) -> &mut T { in get_mut() argument
110 pub unsafe fn get_unchecked(&self) -> &T { in get_unchecked() argument
115 pub unsafe fn get_mut_unchecked(&mut self) -> &mut T { in get_mut_unchecked() argument
120 impl<T> Deref for Lazy<T> {
121 type Target = T;
124 fn deref(&self) -> &T { in deref() argument
129 impl<T> DerefMut for Lazy<T> {
131 fn deref_mut(&mut self) -> &mut T { in deref_mut() argument
136 impl<T: Debug> Debug for Lazy<T> {
146 impl<T> Drop for Lazy<T> {
156 unsafe impl<T: Send + Sync> Sync for Lazy<T> {}
157 unsafe impl<T: Send> Send for Lazy<T> {}