drop_or_else

Function drop_or_else 

Source
pub fn drop_or_else<T, F: FnOnce(Box<dyn Any + Send + 'static>) -> E, E>(
    value: T,
    or_else: F,
) -> Result<(), E>
Expand description

Drop a value. If dropping the value results in an unwinding panic, call the provided closure with the panic payload.