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

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.