ps_promise/methods/pending_sync.rs
1use crate::{Promise, PromiseRejection};
2
3impl<T, E> Promise<T, E>
4where
5 T: Unpin,
6 E: PromiseRejection,
7{
8 /// Polls the promise's inner future using a no-op waker.
9 /// Returns `true` if the promise is still pending.
10 pub fn pending_sync(&mut self) -> bool {
11 self.poll_sync();
12
13 self.is_pending()
14 }
15}