Skip to main content

Promising

Trait Promising 

Source
pub trait Promising {
    type Resolution;
}
Expand description

Marker trait for types which represent Resolution or Promise<Resolution>.

For all types except for Promise, Resolution is equal to the type itself. For Promise or any thenable or type extending Promise, Resolution is the type of the promise resolution.

Manually implementing this trait is only required for custom thenables or types which extend Promise. To disable automatic implementation, use the #[wasm_bindgen(no_promising)] attribute.

Required Associated Types§

Source

type Resolution

The type that this value resolves to.

Implementations on Foreign Types§

Source§

impl Promising for bool

Source§

impl Promising for char

Source§

impl Promising for f32

Source§

impl Promising for i8

Source§

impl Promising for i16

Source§

impl Promising for i32

Source§

impl Promising for isize

Source§

impl Promising for u8

Source§

impl Promising for u16

Source§

impl Promising for u32

Source§

impl Promising for ()

Source§

impl Promising for usize

Source§

impl<T: OptionIntoWasmAbi + ErasableGeneric<Repr = JsValue> + Promising> Promising for Option<T>

Source§

impl<T: ErasableGeneric + Promising, E: ErasableGeneric> Promising for Result<T, E>

Implementors§