pub(crate) type GPUBindingResource = GPUSamplerOrGPUTextureViewOrGPUBufferBinding<DomTypeHolder>;
Aliased Type§
enum GPUBindingResource {
GPUSampler(Root<Dom<GPUSampler>>),
GPUTextureView(Root<Dom<GPUTextureView>>),
GPUBufferBinding(GPUBufferBinding<DomTypeHolder>),
}
Variants§
GPUSampler(Root<Dom<GPUSampler>>)
GPUTextureView(Root<Dom<GPUTextureView>>)
GPUBufferBinding(GPUBufferBinding<DomTypeHolder>)
Implementations
Source§impl<D: DomTypes> GPUSamplerOrGPUTextureViewOrGPUBufferBinding<D>
impl<D: DomTypes> GPUSamplerOrGPUTextureViewOrGPUBufferBinding<D>
unsafe fn TryConvertToGPUSampler( cx: SafeJSContext, value: HandleValue<'_>, ) -> Result<Option<DomRoot<D::GPUSampler>>, ()>
unsafe fn TryConvertToGPUTextureView( cx: SafeJSContext, value: HandleValue<'_>, ) -> Result<Option<DomRoot<D::GPUTextureView>>, ()>
unsafe fn TryConvertToGPUBufferBinding( cx: SafeJSContext, value: HandleValue<'_>, ) -> Result<Option<GPUBufferBinding<D>>, ()>
Trait Implementations
Source§impl<D: DomTypes> FromJSValConvertible for GPUSamplerOrGPUTextureViewOrGPUBufferBinding<D>
impl<D: DomTypes> FromJSValConvertible for GPUSamplerOrGPUTextureViewOrGPUBufferBinding<D>
Source§unsafe fn from_jsval(
cx: *mut JSContext,
value: HandleValue<'_>,
_option: (),
) -> Result<ConversionResult<GPUSamplerOrGPUTextureViewOrGPUBufferBinding<D>>, ()>
unsafe fn from_jsval( cx: *mut JSContext, value: HandleValue<'_>, _option: (), ) -> Result<ConversionResult<GPUSamplerOrGPUTextureViewOrGPUBufferBinding<D>>, ()>
Convert
val
to type Self
.
Optional configuration of type T
can be passed as the option
argument.
If it returns Err(())
, a JSAPI exception is pending.
If it returns Ok(Failure(reason))
, there is no pending JSAPI exception.