Skip to main content

panic_notice

Function panic_notice 

Source
pub fn panic_notice(location: Option<&Location<'_>>) -> String
Expand description

What: The line the hook writes, with the location when the panic has one. Option<&Location<'_>> is “a borrowed location or nothing”; '_ lets the compiler choose how long the borrow lasts. Why: A pure function of the location can be checked exactly.

In TS you’d write (pseudocode):

function panicNotice(location?: Location): string;