Skip to main content

ExternalQueue

Enum ExternalQueue 

Source
#[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§

Trait Implementations§

Source§

impl Debug for ExternalQueue<'_>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> MaybeSend for T
where T: Send + ?Sized,

Source§

impl<T> MaybeSendSync for T
where T: Send + Sync + ?Sized,

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,