Creates an immutable reference which is not bound to lifetime. # Panics Panics if the value is currently mutably borrowed.
(&self)
| 184 | /// |
| 185 | /// Panics if the value is currently mutably borrowed. |
| 186 | pub fn leak_immutable(&self) -> UnsafePyLeaked<&'static T> { |
| 187 | self.try_leak_immutable().expect("already mutably borrowed") |
| 188 | } |
| 189 | |
| 190 | /// Creates an immutable reference which is not bound to lifetime, |
| 191 | /// returning an error if the value is currently mutably borrowed. |