pub struct SingleplexBuildPermit<R: Send> { /* private fields */ }Expand description
A reserved construction slot. Register the fully established resource, then acquire again to use it. Driver registration must precede this commit. Dropping a permit returns its construction reservation exactly once.
Implementations§
Source§impl<R: Send> SingleplexBuildPermit<R>
impl<R: Send> SingleplexBuildPermit<R>
pub fn id(&self) -> ResourceId
Sourcepub fn commit(self, resource: R) -> Result<SingleplexResource<R>, Error>
pub fn commit(self, resource: R) -> Result<SingleplexResource<R>, Error>
A commit racing shutdown transfers the resource into the retirement queue
and returns Closed; the cleanup owner must still drain that queue.
Trait Implementations§
Source§impl<R: Send> Drop for SingleplexBuildPermit<R>
impl<R: Send> Drop for SingleplexBuildPermit<R>
Auto Trait Implementations§
impl<R> Freeze for SingleplexBuildPermit<R>
impl<R> RefUnwindSafe for SingleplexBuildPermit<R>where
Arc<Core<SingleSlot<R>>>: RefUnwindSafe,
impl<R> Send for SingleplexBuildPermit<R>
impl<R> Sync for SingleplexBuildPermit<R>
impl<R> Unpin for SingleplexBuildPermit<R>
impl<R> UnsafeUnpin for SingleplexBuildPermit<R>where
Arc<Core<SingleSlot<R>>>: UnsafeUnpin,
impl<R> UnwindSafe for SingleplexBuildPermit<R>where
Arc<Core<SingleSlot<R>>>: UnwindSafe,
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