Home
last modified time | relevance | path

Searched refs:try_borrow_with (Results 1 - 1 of 1) sorted by relevance

/third_party/rust/crates/lazycell/src/
H A Dlib.rs167 pub fn try_borrow_with<E, F>(&self, f: F) -> Result<&T, E> in try_borrow_with() functions
175 panic!("try_borrow_with: cell was filled by closure") in try_borrow_with()
480 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()

Completed in 1 milliseconds