pub struct JavascriptPromise(/* private fields */);Expand description
A promise whose reactions are admitted only to explicit JavaScript jobs.
Implementations§
Source§impl JavascriptPromise
impl JavascriptPromise
Sourcepub fn state(&self) -> JavascriptPromiseState
pub fn state(&self) -> JavascriptPromiseState
Snapshots the current settlement state.
Sourcepub fn resolve(
&self,
jobs: &mut JavascriptJobs,
value: JavascriptValue,
) -> Result<JobId, CheckpointError>
pub fn resolve( &self, jobs: &mut JavascriptJobs, value: JavascriptValue, ) -> Result<JobId, CheckpointError>
Enqueues first-settlement fulfillment as a reaction job.
Sourcepub fn reject(
&self,
jobs: &mut JavascriptJobs,
error: JavascriptException,
) -> Result<JobId, CheckpointError>
pub fn reject( &self, jobs: &mut JavascriptJobs, error: JavascriptException, ) -> Result<JobId, CheckpointError>
Enqueues first-settlement rejection as a reaction job.
Trait Implementations§
Source§impl Clone for JavascriptPromise
impl Clone for JavascriptPromise
Source§fn clone(&self) -> JavascriptPromise
fn clone(&self) -> JavascriptPromise
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 !RefUnwindSafe for JavascriptPromise
impl !Send for JavascriptPromise
impl !Sync for JavascriptPromise
impl !UnwindSafe for JavascriptPromise
impl Freeze for JavascriptPromise
impl Unpin for JavascriptPromise
impl UnsafeUnpin for JavascriptPromise
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