pub struct JsPromise<'a> { /* private fields */ }Implementations§
Source§impl<'a> JsPromise<'a>
impl<'a> JsPromise<'a>
pub fn from_object(env: &'a Env, inner: JsObject) -> Result<Self>
pub fn then<V>(
&self,
callback: impl FnOnce(Env, V) -> Result<()> + 'static,
) -> Result<&Self>where
V: NapiValue,
pub fn catch<V>(
&self,
callback: impl FnOnce(Env, V) -> Result<()> + 'static,
) -> Result<&Self>where
V: NapiValue,
Auto Trait Implementations§
impl<'a> Freeze for JsPromise<'a>
impl<'a> RefUnwindSafe for JsPromise<'a>
impl<'a> !Send for JsPromise<'a>
impl<'a> !Sync for JsPromise<'a>
impl<'a> Unpin for JsPromise<'a>
impl<'a> UnwindSafe for JsPromise<'a>
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