pub struct LifeGuard { /* private fields */ }
Expand description
Information needed to decide when it’s safe to free some wgpu-core resource.
Each type representing a wgpu-core
resource, like Device
,
Buffer
, etc., contains a LifeGuard
which indicates whether
it is safe to free.
A resource may need to be retained for any of several reasons:
-
The user may hold a reference to it (via a
wgpu::Buffer
, say). -
Other resources may depend on it (a texture view’s backing texture, for example).
-
It may be used by commands sent to the GPU that have not yet finished execution.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for LifeGuard
impl Send for LifeGuard
impl Sync for LifeGuard
impl Unpin for LifeGuard
impl UnwindSafe for LifeGuard
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more