Lines Matching defs:filled
17 //! This crate provides a `LazyCell` struct which acts as a lazily filled
36 //! assert!(!lazycell.filled());
38 //! assert!(lazycell.filled());
56 /// A lazily filled `Cell`, with mutable contents.
58 /// A `LazyCell` is completely frozen once filled, **unless** you have `&mut`
99 /// Test whether this cell has been previously filled.
100 pub fn filled(&self) -> bool {
125 /// If the cell has not yet been filled, the cell is first filled using the
130 /// Panics if the cell becomes filled as a side effect of `f`.
137 panic!("borrow_with: cell was filled by closure")
145 /// If the cell has not yet been filled, the cell is first filled using the
150 /// Panics if the cell becomes filled as a side effect of `f`.
152 if !self.filled() {
155 panic!("borrow_mut_with: cell was filled by closure")
166 /// Panics if the cell becomes filled as a side effect of `f`.
175 panic!("try_borrow_with: cell was filled by closure")
184 /// Panics if the cell becomes filled as a side effect of `f`.
188 if self.filled() {
193 panic!("try_borrow_mut_with: cell was filled by closure")
234 /// A lazily filled and thread-safe `Cell`, with frozen contents.
288 /// Test whether this cell has been previously filled.
289 pub fn filled(&self) -> bool {
368 assert!(!lazycell.filled());
370 assert!(lazycell.filled());
563 assert!(!lazycell.filled());
565 assert!(lazycell.filled());