ps-promise 0.1.0-17

Promise-like owned futures
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::{PromiseRejection, TaskFailure, WrappedPromiseRejection};

impl<E> PromiseRejection for WrappedPromiseRejection<E>
where
    E: Send + 'static,
{
    fn already_consumed() -> Self {
        Self::AlreadyConsumed
    }

    fn task_failed(failure: TaskFailure) -> Self {
        Self::TaskFailed(failure)
    }
}