(&self, f: impl FnOnce(&dyn LinearMemory) -> R)
| 33 | } |
| 34 | |
| 35 | fn with_inner<R>(&self, f: impl FnOnce(&dyn LinearMemory) -> R) -> R { |
| 36 | self.ensure_materialized(); |
| 37 | let inner = self.inner.borrow(); |
| 38 | f(inner.as_deref().expect("lazy memory should be materialized")) |
| 39 | } |
| 40 | |
| 41 | fn try_with_inner<R>(&self, f: impl FnOnce(&dyn LinearMemory) -> R) -> core::result::Result<R, crate::Trap> { |
| 42 | self.try_ensure_materialized()?; |
no test coverage detected