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