pub struct DeferredWgpuSlot { /* private fields */ }Available on crate feature
wgpu only.Expand description
Shared, mutate-once slot the producer fills in after the caller
submits the encoded work. Used by SyncPoint::DeferredWgpu.
The slot is initialised to None at mint time and transitions to
Some(idx) exactly once via Self::set; subsequent calls are
rejected with Error::InvalidArgument (single-shot semantics).
Implementations§
Source§impl DeferredWgpuSlot
impl DeferredWgpuSlot
pub fn new() -> Self
Sourcepub fn set(&self, idx: SubmissionIndex) -> Result<(), Error>
pub fn set(&self, idx: SubmissionIndex) -> Result<(), Error>
Commit the post-submit SubmissionIndex. Single-shot — a second
call returns Error::InvalidArgument without overwriting the
committed value.
Sourcepub fn get(&self) -> Option<&SubmissionIndex>
pub fn get(&self) -> Option<&SubmissionIndex>
Return the committed SubmissionIndex, or None if the producer
has not yet submitted.
Trait Implementations§
Source§impl Debug for DeferredWgpuSlot
impl Debug for DeferredWgpuSlot
Auto Trait Implementations§
impl !Freeze for DeferredWgpuSlot
impl RefUnwindSafe for DeferredWgpuSlot
impl Send for DeferredWgpuSlot
impl Sync for DeferredWgpuSlot
impl Unpin for DeferredWgpuSlot
impl UnsafeUnpin for DeferredWgpuSlot
impl UnwindSafe for DeferredWgpuSlot
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