pub fn scoped<T>( device: &Device, operation: impl FnOnce() -> T, ) -> (T, Option<Error>)
Runs operation inside this thread’s own error scopes and returns the first error it raised, instead of recording it on a client.
operation