Lines Matching refs:LazyCell
68 pub struct LazyCell<T> { struct
72 impl<T> LazyCell<T> { impl
74 pub fn new() -> LazyCell<T> { in new()
75 LazyCell { inner: UnsafeCell::new(None) } in new()
215 impl<T: Copy> LazyCell<T> { impl
225 impl<T> Default for LazyCell<T> { implementation
231 impl <T: Clone> Clone for LazyCell<T> { implementation
237 fn clone(&self) -> LazyCell<T> { in clone()
238 LazyCell { inner: UnsafeCell::new(self.borrow().map(Clone::clone) ) } in clone()
370 use super::{AtomicLazyCell, LazyCell};
374 let lazycell: LazyCell<usize> = LazyCell::new(); in test_borrow_from_empty()
385 let lazycell = LazyCell::new(); in test_fill_and_borrow()
400 let mut lazycell = LazyCell::new(); in test_borrow_mut()
410 lazycell = LazyCell::new(); in test_borrow_mut()
416 let lazycell = LazyCell::new(); in test_already_filled_error()
424 let lazycell = LazyCell::new(); in test_borrow_with()
432 let lazycell = LazyCell::new(); in test_borrow_with_already_filled()
441 let lazycell = LazyCell::new(); in test_borrow_with_not_called_when_filled()
454 let lazycell: LazyCell<Box<i32>> = LazyCell::new(); in test_borrow_with_sound_with_reentrancy()
467 let mut lazycell = LazyCell::new(); in test_borrow_mut_with()
479 let mut lazycell = LazyCell::new(); in test_borrow_mut_with_already_filled()
488 let mut lazycell = LazyCell::new(); in test_borrow_mut_with_not_called_when_filled()
498 let lazycell = LazyCell::new(); in test_try_borrow_with_ok()
505 let lazycell = LazyCell::<()>::new(); in test_try_borrow_with_err()
512 let lazycell = LazyCell::new(); in test_try_borrow_with_already_filled()
521 let lazycell: LazyCell<Box<i32>> = LazyCell::new(); in test_try_borrow_with_sound_with_reentrancy()
534 let mut lazycell = LazyCell::new(); in test_try_borrow_mut_with_ok()
545 let mut lazycell = LazyCell::<()>::new(); in test_try_borrow_mut_with_err()
552 let mut lazycell = LazyCell::new(); in test_try_borrow_mut_with_already_filled()
560 let lazycell = LazyCell::new(); in test_into_inner()
612 let mut cell = LazyCell::new(); in normal_replace()
618 let mut cell = LazyCell::new(); in normal_replace()
633 let mut cell = LazyCell::new(); in clone()
675 let _: LazyCell<Defaultable> = LazyCell::default(); in default()
676 let _: LazyCell<NonDefaultable> = LazyCell::default(); in default()