mirror of
https://gitlab.com/fabinfra/fabaccess/bffh.git
synced 2025-03-12 16:11:43 +01:00
15 lines
325 B
Rust
15 lines
325 B
Rust
|
use crate::catch_unwind::CatchUnwind;
|
||
|
use std::future::Future;
|
||
|
use std::panic::UnwindSafe;
|
||
|
|
||
|
pub(crate) trait ProcFutureExt: Future {
|
||
|
fn catch_unwind(self) -> CatchUnwind<Self>
|
||
|
where
|
||
|
Self: Sized + UnwindSafe,
|
||
|
{
|
||
|
CatchUnwind::new(self)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
impl<T: ?Sized> ProcFutureExt for T where T: Future {}
|