pub struct ErrorScopeGuard { /* private fields */ }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.
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.