devela::all

Function panic_any

1.51.0 ยท Source
pub fn panic_any<M>(msg: M) -> !
where M: 'static + Any + Send,
Available on crate feature std only.
Expand description

std Panic the current thread with the given message as the panic payload.

Re-exported from std::panic:: .


Panics the current thread with the given message as the panic payload.

The message can be of any (Any + Send) type, not just strings.

The message is wrapped in a Box<'static + Any + Send>, which can be accessed later using PanicHookInfo::payload.

See the panic! macro for more information about panicking.