Searched refs:try_borrow_with (Results 1 – 2 of 2) sorted by relevance
167 pub fn try_borrow_with<E, F>(&self, f: F) -> Result<&T, E> in try_borrow_with() method480 let result = lazycell.try_borrow_with::<(), _>(|| Ok(1)); in test_try_borrow_with_ok()487 let result = lazycell.try_borrow_with(|| Err(1)); in test_try_borrow_with_err()495 let result = lazycell.try_borrow_with::<(), _>(|| unreachable!()); in test_try_borrow_with_already_filled()506 let _ = lazycell.try_borrow_with::<(), _>(|| { in test_try_borrow_with_sound_with_reentrancy()
58 * add LazyCell::try_borrow_with ([bffa4028](https://github.com/indiv0/lazycell/commit/bffa4028966…