ps-promise 0.1.0-17

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

impl<T, E> From<BoxedPromiseFuture<T, E>> for Promise<T, E>
where
    E: PromiseRejection,
{
    fn from(future: BoxedPromiseFuture<T, E>) -> Self {
        Self {
            state: State::Pending(future),
        }
    }
}