Lines Matching defs:new
33 //! let lazycell = LazyCell::new();
67 /// Creates a new, empty, `LazyCell`.
68 pub fn new() -> LazyCell<T> {
69 LazyCell { inner: UnsafeCell::new(None) }
225 LazyCell { inner: UnsafeCell::new(self.borrow().map(Clone::clone) ) }
244 inner: UnsafeCell::new(None),
245 state: AtomicUsize::new(NONE),
248 /// Creates a new, empty, `AtomicLazyCell`.
249 pub fn new() -> AtomicLazyCell<T> {
338 inner: UnsafeCell::new(Some(v.clone())),
339 state: AtomicUsize::new(SOME),
355 let lazycell: LazyCell<usize> = LazyCell::new();
366 let lazycell = LazyCell::new();
381 let mut lazycell = LazyCell::new();
391 lazycell = LazyCell::new();
397 let lazycell = LazyCell::new();
405 let lazycell = LazyCell::new();
413 let lazycell = LazyCell::new();
422 let lazycell = LazyCell::new();
435 let lazycell: LazyCell<Box<i32>> = LazyCell::new();
440 let _ = lazycell.fill(Box::new(1));
442 Box::new(2)
448 let mut lazycell = LazyCell::new();
460 let mut lazycell = LazyCell::new();
469 let mut lazycell = LazyCell::new();
479 let lazycell = LazyCell::new();
486 let lazycell = LazyCell::<()>::new();
493 let lazycell = LazyCell::new();
502 let lazycell: LazyCell<Box<i32>> = LazyCell::new();
507 let _ = lazycell.fill(Box::new(1));
509 Ok(Box::new(2))
515 let mut lazycell = LazyCell::new();
526 let mut lazycell = LazyCell::<()>::new();
533 let mut lazycell = LazyCell::new();
541 let lazycell = LazyCell::new();
550 let lazycell: AtomicLazyCell<usize> = AtomicLazyCell::new();
561 let lazycell = AtomicLazyCell::new();
576 let lazycell = AtomicLazyCell::new();
584 let lazycell = AtomicLazyCell::new();
593 let mut cell = LazyCell::new();
599 let mut cell = LazyCell::new();
605 let mut cell = AtomicLazyCell::new();
614 let mut cell = LazyCell::new();
633 let mut cell = AtomicLazyCell::new();