pub fn did_oom<T>(device: &Device, callback: impl FnOnce() -> T) -> (bool, T)
Returns true if the provided callback encounters an out-of-memory error.