Struct wgpu_core::command::RecordingGuard
source · pub(crate) struct RecordingGuard<'a> {
inner: &'a mut CommandEncoderStatus,
}
Expand description
A guard to enforce error reporting, for a CommandBuffer
in the Recording
state.
An RecordingGuard
holds a mutable reference to a CommandEncoderStatus
that
has been verified to be in the Recording
state. The RecordingGuard
dereferences
mutably to the CommandBufferMutable
that the status holds.
Dropping an RecordingGuard
sets the CommandBuffer
’s state to
CommandEncoderStatus::Error
. If your use of the guard was
successful, call its mark_successful
method to dispose of it.
Fields§
§inner: &'a mut CommandEncoderStatus
Implementations§
source§impl<'a> RecordingGuard<'a>
impl<'a> RecordingGuard<'a>
pub(crate) fn mark_successful(self)
Methods from Deref<Target = CommandBufferMutable>§
pub(crate) fn validate_blas_actions( &self, ) -> Result<(), ValidateBlasActionsError>
pub(crate) fn validate_tlas_actions( &self, snatch_guard: &SnatchGuard<'_>, ) -> Result<(), ValidateTlasActionsError>
pub(crate) fn open_encoder_and_tracker( &mut self, device: &Device, ) -> Result<(&mut dyn DynCommandEncoder, &mut Tracker), DeviceError>
Trait Implementations§
source§impl<'a> Deref for RecordingGuard<'a>
impl<'a> Deref for RecordingGuard<'a>
source§impl<'a> DerefMut for RecordingGuard<'a>
impl<'a> DerefMut for RecordingGuard<'a>
Auto Trait Implementations§
impl<'a> Freeze for RecordingGuard<'a>
impl<'a> !RefUnwindSafe for RecordingGuard<'a>
impl<'a> Send for RecordingGuard<'a>
impl<'a> Sync for RecordingGuard<'a>
impl<'a> Unpin for RecordingGuard<'a>
impl<'a> !UnwindSafe for RecordingGuard<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more