Module panic

1.41.0 ยท Source
Expand description

Panic support in the standard library.

Re-exportsยง

pub use self::location::Location;
pub use self::panic_info::PanicInfo;
pub use self::panic_info::PanicMessage;
pub use self::unwind_safe::AssertUnwindSafe;
pub use self::unwind_safe::RefUnwindSafe;
pub use self::unwind_safe::UnwindSafe;

Modulesยง

location ๐Ÿ”’
panic_info ๐Ÿ”’
unwind_safe ๐Ÿ”’

Macrosยง

const_assert ๐Ÿ‘ป Experimental
A version of assert that prints a non-formatting message in const contexts.
const_panic ๐Ÿ‘ป Experimental
Helper macro for panicking in a const fn. Invoke as:
panic_2015 ๐Ÿ‘ป Experimental
panic_2021 ๐Ÿ‘ป Experimental
unreachable_2015 ๐Ÿ‘ป Experimental
unreachable_2021 ๐Ÿ‘ป Experimental

Traitsยง

PanicPayload ๐Ÿ‘ป Experimental
An internal trait used by std to pass data from std to panic_unwind and other panic runtimes. Not intended to be stabilized any time soon, do not use.

Functionsยง

abort_unwindExperimental
Invokes a closure, aborting if the closure unwinds.