ps_promise/methods/shared/promise/mod.rs
1mod implementations;
2mod methods;
3
4use std::{sync::Arc, task::Waker};
5
6use crate::PromiseRejection;
7
8use super::state::SharedState;
9
10/// A cloneable, multi-consumer handle to a [`crate::Promise`], created by [`crate::Promise::shared`].
11pub struct SharedPromise<T, E>
12where
13 E: PromiseRejection,
14{
15 pub(super) state: Arc<SharedState<T, E>>,
16 pub(super) waker: Waker,
17 pub(super) waiter_id: usize,
18}