pub struct BindingContext { /* private fields */ }Expand description
Context for an async binding function.
Implementations§
Source§impl BindingContext
impl BindingContext
Sourcepub fn done(self, result: JSObject)
pub fn done(self, result: JSObject)
Completes the JS function successfully. Equivalent to complete(Ok(result))
Sourcepub fn err(self, error: JSObject)
pub fn err(self, error: JSObject)
Completes the JS function with an error. Equivalent to complete(Err(error))
Sourcepub fn complete(self, result: JSResult)
pub fn complete(self, result: JSResult)
Completes the JS function, either successfully or not. Takes the BindingContext by
value as it releases the outstanding call on the Chrome(ium) side.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BindingContext
impl !RefUnwindSafe for BindingContext
impl Send for BindingContext
impl Sync for BindingContext
impl Unpin for BindingContext
impl !UnwindSafe for BindingContext
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