pub struct AwaitPromiseBuilder { /* private fields */ }Expand description
Builder for AwaitPromise.
Implementations§
Source§impl AwaitPromiseBuilder
impl AwaitPromiseBuilder
Sourcepub fn promise_object_id<VALUE: Into<RemoteObjectId>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn promise_object_id<VALUE: Into<RemoteObjectId>>( &mut self, value: VALUE, ) -> &mut Self
Identifier of the promise.
Sourcepub fn return_by_value<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn return_by_value<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
Whether the result is expected to be a JSON object that should be sent by value.
Sourcepub fn generate_preview<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn generate_preview<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
Whether preview should be generated for the result.
Sourcepub fn build(&self) -> Result<AwaitPromise, AwaitPromiseBuilderError>
pub fn build(&self) -> Result<AwaitPromise, AwaitPromiseBuilderError>
Trait Implementations§
Source§impl Clone for AwaitPromiseBuilder
impl Clone for AwaitPromiseBuilder
Source§fn clone(&self) -> AwaitPromiseBuilder
fn clone(&self) -> AwaitPromiseBuilder
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 AwaitPromiseBuilder
impl RefUnwindSafe for AwaitPromiseBuilder
impl Send for AwaitPromiseBuilder
impl Sync for AwaitPromiseBuilder
impl Unpin for AwaitPromiseBuilder
impl UnsafeUnpin for AwaitPromiseBuilder
impl UnwindSafe for AwaitPromiseBuilder
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