lightproc 0.3.5

Lightweight process abstraction for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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 {}