• Home
  • Raw
  • Download

Lines Matching refs:Lazy

570     pub struct Lazy<T, F = fn() -> T> {  struct
576 impl<T, F: RefUnwindSafe> RefUnwindSafe for Lazy<T, F> where OnceCell<T>: RefUnwindSafe {} implementation
578 impl<T: fmt::Debug, F> fmt::Debug for Lazy<T, F> { implementation
584 impl<T, F> Lazy<T, F> { impl
599 pub const fn new(init: F) -> Lazy<T, F> { in new()
600 Lazy { cell: OnceCell::new(), init: Cell::new(Some(init)) } in new()
606 pub fn into_value(this: Lazy<T, F>) -> Result<T, F> { in into_value()
615 impl<T, F: FnOnce() -> T> Lazy<T, F> { implementation
630 pub fn force(this: &Lazy<T, F>) -> &T { in force()
638 impl<T, F: FnOnce() -> T> Deref for Lazy<T, F> { implementation
641 Lazy::force(self) in deref()
645 impl<T, F: FnOnce() -> T> DerefMut for Lazy<T, F> { implementation
647 Lazy::force(self); in deref_mut()
652 impl<T: Default> Default for Lazy<T> { implementation
654 fn default() -> Lazy<T> { in default()
655 Lazy::new(T::default) in default()
966 pub struct Lazy<T, F = fn() -> T> { struct
971 impl<T: fmt::Debug, F> fmt::Debug for Lazy<T, F> { implementation
982 unsafe impl<T, F: Send> Sync for Lazy<T, F> where OnceCell<T>: Sync {} implementation
986 impl<T, F: RefUnwindSafe> RefUnwindSafe for Lazy<T, F> where OnceCell<T>: RefUnwindSafe {} implementation
988 impl<T, F> Lazy<T, F> { impl
991 pub const fn new(f: F) -> Lazy<T, F> { in new()
992 Lazy { cell: OnceCell::new(), init: Cell::new(Some(f)) } in new()
998 pub fn into_value(this: Lazy<T, F>) -> Result<T, F> { in into_value()
1007 impl<T, F: FnOnce() -> T> Lazy<T, F> { implementation
1021 pub fn force(this: &Lazy<T, F>) -> &T { in force()
1029 impl<T, F: FnOnce() -> T> Deref for Lazy<T, F> { implementation
1032 Lazy::force(self) in deref()
1036 impl<T, F: FnOnce() -> T> DerefMut for Lazy<T, F> { implementation
1038 Lazy::force(self); in deref_mut()
1043 impl<T: Default> Default for Lazy<T> { implementation
1045 fn default() -> Lazy<T> { in default()
1046 Lazy::new(T::default) in default()