ps-promise 0.1.0-17

Promise-like owned futures
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use std::task::Context;

use crate::Promise;

impl<T, E> Promise<T, E> {
    /// Polls the promise's inner future if pending.
    /// Returns `true` if the promise is now settled.
    pub fn poll_settled(&mut self, cx: &mut Context<'_>) -> bool {
        self.poll(cx);

        self.is_settled()
    }
}