Immutably borrows the wrapped value. # Panics Panics if the value is currently mutably borrowed.
(&self)
| 139 | /// |
| 140 | /// Panics if the value is currently mutably borrowed. |
| 141 | pub fn borrow(&self) -> Ref<'a, T> { |
| 142 | self.try_borrow().expect("already mutably borrowed") |
| 143 | } |
| 144 | |
| 145 | /// Immutably borrows the wrapped value, returning an error if the value |
| 146 | /// is currently mutably borrowed. |