Struct PromiseState
#[must_use]
#[repr(transparent)]
pub struct PromiseState<T = JsValue> { /* private fields */ }
The PromiseState object represents the the status of the promise,
as used in allSettled.
Implementations
impl<T> PromiseState<T>
fn is_fulfilled(&self) -> boolfn is_rejected(&self) -> bool
impl<T> PromiseState<T>
fn get_status(&self) -> StringA string, either "fulfilled" or "rejected", indicating the eventual state of the promise.
impl<T> PromiseState<T>
fn get_value(&self) -> Option<T> where Option<T>: ErasableGenericOwn<Option<JsValue>>,Only present if status is "fulfilled". The value that the promise was fulfilled with.
impl<T> PromiseState<T>
fn get_reason(&self) -> Option<JsValue>Only present if status is "rejected". The reason that the promise was rejected with.
Trait Implementations
impl From<JsValue> for PromiseState
fn from(obj: JsValue) -> Self
impl<T> AsRef<JsValue> for PromiseState<T>
fn as_ref(&self) -> &JsValue
impl<T> AsRef<Object> for PromiseState<T>
fn as_ref(&self) -> &Object
impl<T> AsRef<PromiseState<T>> for PromiseState<T>
fn as_ref(&self) -> &PromiseState<T>
impl<T> Deref for PromiseState<T>
type Target = Object;fn deref(&self) -> &Object
impl<T> ErasableGeneric for PromiseState<T>
type Repr = JsValue;
impl<T> FromWasmAbi for PromiseState<T>
type Abi = <JsValue as FromWasmAbi>::Abi;unsafe fn from_abi(js: Self::Abi) -> Self
impl<T> IntoJsGeneric for PromiseState<T>
where
PromiseState<T>: JsGeneric,
type JsCanon = PromiseState<T>;fn to_js(self) -> PromiseState<T>
impl<T> IntoWasmAbi for PromiseState<T>
type Abi = <JsValue as IntoWasmAbi>::Abi;fn into_abi(self) -> Self::Abi
impl<T> JsCast for PromiseState<T>
fn instanceof(val: &JsValue) -> boolfn unchecked_from_js(val: JsValue) -> Selffn unchecked_from_js_ref(val: &JsValue) -> &Self
impl<T> LongRefFromWasmAbi for PromiseState<T>
type Abi = <JsValue as LongRefFromWasmAbi>::Abi;type Anchor = PromiseState<T>;unsafe fn long_ref_from_abi(js: Self::Abi) -> Self::Anchor
impl<T> OptionFromWasmAbi for PromiseState<T>
fn is_none(abi: &Self::Abi) -> bool
impl<T> OptionIntoWasmAbi for PromiseState<T>
fn none() -> Self::Abi
impl<T> Promising for PromiseState<T>
type Resolution = PromiseState<T>;
impl<T> RefFromWasmAbi for PromiseState<T>
type Abi = <JsValue as RefFromWasmAbi>::Abi;type Anchor = ManuallyDrop<PromiseState<T>>;unsafe fn ref_from_abi(js: Self::Abi) -> Self::Anchor
impl<T> WasmDescribe for PromiseState<T>
fn describe()
impl<T, __UpcastTarget0> UpcastFrom<PromiseState<T>> for PromiseState<__UpcastTarget0>
where
__UpcastTarget0: UpcastFrom<T>,
impl<T: Clone> Clone for PromiseState<T>
fn clone(&self) -> Self
impl<T: Debug> Debug for PromiseState<T>
fn fmt(&self, f: &mut Formatter<'_>) -> Result