pub use TaskFailure;
pub use WrappedPromiseRejection;
/// A rejection type usable as the error of a [`Promise`](crate::Promise).
///
/// A promise must synthesize rejection values on its own in two cases: when
/// a consumed promise is consumed again
/// ([`already_consumed`](Self::already_consumed)), and when the underlying
/// task fails without producing a rejection, e.g. by panicking
/// ([`task_failed`](Self::task_failed)). This trait provides those
/// constructors, which is why every rejection type must implement it.
///
/// Escape hatches exist for error types that do not model these cases:
/// `()` discards all information, `Vec<E>` lifts rejections element-wise
/// (and is the rejection type of [`Promise::any`](crate::Promise::any)),
/// [`WrappedPromiseRejection`] wraps an arbitrary error type, and the
/// `anyhow` feature implements the trait for `anyhow::Error`.