Lines Matching refs:init
214 //! pub fn init(&self, value: T) {
244 //! a.b.init(&b);
245 //! b.a.init(&a);
326 //! * [lazy-init](https://crates.io/crates/lazy-init)
604 assert!(self.set(val).is_ok(), "reentrant init");
686 init: Cell<Option<F>>,
693 f.debug_struct("Lazy").field("cell", &self.cell).field("init", &"..").finish()
712 pub const fn new(init: F) -> Lazy<T, F> {
713 Lazy { cell: OnceCell::new(), init: Cell::new(Some(init)) }
721 let init = this.init;
723 init.take().unwrap_or_else(|| panic!("Lazy instance has previously been poisoned"))
744 this.cell.get_or_init(|| match this.init.take() {
1222 init: Cell<Option<F>>,
1227 f.debug_struct("Lazy").field("cell", &self.cell).field("init", &"..").finish()
1244 Lazy { cell: OnceCell::new(), init: Cell::new(Some(f)) }
1252 let init = this.init;
1254 init.take().unwrap_or_else(|| panic!("Lazy instance has previously been poisoned"))
1274 this.cell.get_or_init(|| match this.init.take() {