pub struct WasmPromise { /* private fields */ }
Implementations§
Source§impl WasmPromise
impl WasmPromise
pub fn new() -> Self
pub fn resolved(v: JsValue) -> Self
pub fn set_promise(&mut self, p: Promise)
pub fn get_promise(&self) -> Promise
pub fn reject(&self, a: JsValue) -> Result<JsValue, JsValue>
pub fn resolve(&self, v: JsValue) -> Result<JsValue, JsValue>
pub async fn into_future(&self) -> Result<JsValue, JsValue>
Trait Implementations§
Source§impl Clone for WasmPromise
impl Clone for WasmPromise
Source§fn clone(&self) -> WasmPromise
fn clone(&self) -> WasmPromise
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for WasmPromise
impl !RefUnwindSafe for WasmPromise
impl !Send for WasmPromise
impl !Sync for WasmPromise
impl Unpin for WasmPromise
impl !UnwindSafe for WasmPromise
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more