Module panic

1.41.0 · Source
Expand description

Panic support in the standard library.

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

Structs§

AssertUnwindSafe
A simple wrapper around a type to assert that it is unwind safe.
Location
A struct containing information about the location of a panic.
PanicInfo
A struct providing information about a panic.
PanicMessage
A message that was given to the panic!() macro.

Traits§

RefUnwindSafe
A marker trait representing types where a shared reference is considered unwind safe.
UnwindSafe
A marker trait which represents “panic safe” types in Rust.
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.