#[non_exhaustive]pub enum ExternalQueue<'a> {
WgpuEncoder(&'a mut CommandEncoder),
OpenClQueue(&'a ClQueueRef),
CudaStream(&'a CudaStreamRef),
MetalCommandBuffer(&'a MtlCommandBufferRef),
Cpu,
_Phantom(PhantomData<&'a ()>),
}Expand description
Borrowed handle into an external command queue. The 'a lifetime
ties the queue to the caller’s scope so the borrow-checker prevents
reentrant use across the call it is lent to.
The payloads are the typed handle newtypes re-exported at the crate
root — MtlCommandBufferRef and, under the matching feature,
ClQueueRef / CudaStreamRef — rather than bare *mut c_voids.
Construction of each newtype happens once at the call-site boundary
via its try_from_raw(unsafe { ... }); pattern-match arms inside
backends are safe code.
_Phantom variant exists so 'a remains load-bearing under
--no-default-features (where every other typed variant is cfg’d out).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
WgpuEncoder(&'a mut CommandEncoder)
Available on crate feature
wgpu only.OpenClQueue(&'a ClQueueRef)
Available on crate feature
opencl only.CudaStream(&'a CudaStreamRef)
Available on crate feature
cuda only.MetalCommandBuffer(&'a MtlCommandBufferRef)
Cpu
_Phantom(PhantomData<&'a ()>)
Implementations§
Source§impl ExternalQueue<'_>
impl ExternalQueue<'_>
pub fn backend(&self) -> BackendKind
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ExternalQueue<'a>
impl<'a> !UnwindSafe for ExternalQueue<'a>
impl<'a> Freeze for ExternalQueue<'a>
impl<'a> Send for ExternalQueue<'a>
impl<'a> Sync for ExternalQueue<'a>
impl<'a> Unpin for ExternalQueue<'a>
impl<'a> UnsafeUnpin for ExternalQueue<'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