Skip to main content

ps_promise/methods/
is_rejected.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_rejected(&self) -> bool {
9        matches!(self, Self::Rejected(_))
10    }
11}