Skip to main content

ps_promise/methods/
is_pending.rs

1use crate::{Promise, PromiseRejection};
2
3impl<T, E> Promise<T, E>
4where
5    T: Unpin,
6    E: PromiseRejection,
7{
8    pub const fn is_pending(&self) -> bool {
9        matches!(self, Self::Pending(_))
10    }
11}