hyperlane/panic/type.rs
1use crate::*;
2
3/// A type alias for an `Option` that may contain a `Panic` struct.
4///
5/// This is used in contexts where a panic might not have occurred, allowing for
6/// graceful handling of both panic and non-panic scenarios.
7pub type OptionPanic = Option<Panic>;
8/// A type alias for an optional reference to a `Location`.
9///
10/// The lifetimes `'a` and `'b` are tied to the `PanicHookInfo` from which the
11/// location information is sourced. This ensures that the reference does not
12/// outlive the panic information itself, preventing dangling pointers.
13pub type OptionLocationRef<'a, 'b> = Option<&'a Location<'b>>;