pub struct ErrorScopeGuard {
device: DispatchDevice,
index: u32,
popped: bool,
_phantom: PhantomData<*mut ()>,
}Expand description
Guard for an error scope pushed with Device::push_error_scope().
Call pop() to pop the scope and get a future for the result. If
the guard is dropped without being popped explicitly, the scope will still be popped,
and the captured errors will be dropped.
This guard is neither Send nor Sync, as error scopes are handled
on a per-thread basis when the std feature is enabled.
Fields§
§device: DispatchDevice§index: u32§popped: bool§_phantom: PhantomData<*mut ()>Implementations§
Source§impl ErrorScopeGuard
impl ErrorScopeGuard
Sourcepub fn pop(self) -> impl Future<Output = Option<Error>> + WasmNotSend
pub fn pop(self) -> impl Future<Output = Option<Error>> + WasmNotSend
Pops the error scope.
Returns a future which resolves to the error captured by this scope, if any. The pop takes effect immediately; the future does not need to be awaited before doing work that is outside of this error scope.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ErrorScopeGuard
impl !RefUnwindSafe for ErrorScopeGuard
impl !Send for ErrorScopeGuard
impl !Sync for ErrorScopeGuard
impl Unpin for ErrorScopeGuard
impl !UnwindSafe for ErrorScopeGuard
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