pub struct JavascriptAsyncFunction { /* private fields */ }Expand description
Async function execution is a generator whose terminal result settles a promise.
Implementations§
Source§impl JavascriptAsyncFunction
impl JavascriptAsyncFunction
Sourcepub fn new(generator: JavascriptGenerator) -> Self
pub fn new(generator: JavascriptGenerator) -> Self
Wraps a resumable body and its externally visible promise.
Sourcepub fn promise(&self) -> JavascriptPromise
pub fn promise(&self) -> JavascriptPromise
Promise settled by explicit calls to Self::resume.
Sourcepub fn resume(
&mut self,
packet: ResumePacket<JavascriptValue, JavascriptException>,
jobs: &mut JavascriptJobs,
) -> Result<ResumeResult<JavascriptValue, JavascriptValue, JavascriptException>, FrameError>
pub fn resume( &mut self, packet: ResumePacket<JavascriptValue, JavascriptException>, jobs: &mut JavascriptJobs, ) -> Result<ResumeResult<JavascriptValue, JavascriptValue, JavascriptException>, FrameError>
Advances the body and admits terminal settlement to the microtask queue.
Auto Trait Implementations§
impl !RefUnwindSafe for JavascriptAsyncFunction
impl !Send for JavascriptAsyncFunction
impl !Sync for JavascriptAsyncFunction
impl !UnwindSafe for JavascriptAsyncFunction
impl Freeze for JavascriptAsyncFunction
impl Unpin for JavascriptAsyncFunction
impl UnsafeUnpin for JavascriptAsyncFunction
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