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 CommandEncoderStatusImplementations§
Source§impl<'a> RecordingGuard<'a>
impl<'a> RecordingGuard<'a>
pub(crate) fn mark_successful(self)
fn record<F: FnOnce(&mut CommandBufferMutable) -> Result<(), E>, E: Clone + Into<CommandEncoderError>>( self, f: F, )
Sourcepub(crate) fn record_as_hal_mut<T, F: FnOnce(Option<&mut CommandBufferMutable>) -> T>(
self,
f: F,
) -> T
pub(crate) fn record_as_hal_mut<T, F: FnOnce(Option<&mut CommandBufferMutable>) -> T>( self, f: F, ) -> T
Special version of record used by command_encoder_as_hal_mut. This
version takes an infallible recording closure.
Methods from Deref<Target = CommandBufferMutable>§
pub(crate) fn validate_acceleration_structure_actions( &self, snatch_guard: &SnatchGuard<'_>, command_index_guard: &mut RwLockWriteGuard<'_, CommandIndices>, ) -> Result<(), ValidateAsActionsError>
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