pub trait WebGPUPromiseTrait<D: DomTypes> {
// Required methods
fn callback_promise_adapter(
self: &Rc<Self>,
d: &GPUAdapter<D>,
) -> GenericCallback<WebGPUDeviceResponse>;
fn callback_promise_gpubuffer(
self: &Rc<Self>,
d: &GPUBuffer<D>,
) -> GenericCallback<Result<Mapping, BufferAccessError>>;
fn callback_promise_gpu(
self: &Rc<Self>,
d: &GPU<D>,
) -> GenericCallback<WebGPUAdapterResponse>;
}Expand description
The main trait for creating and using promises in script_webgpu.
Required Methods§
fn callback_promise_adapter( self: &Rc<Self>, d: &GPUAdapter<D>, ) -> GenericCallback<WebGPUDeviceResponse>
fn callback_promise_gpubuffer( self: &Rc<Self>, d: &GPUBuffer<D>, ) -> GenericCallback<Result<Mapping, BufferAccessError>>
fn callback_promise_gpu( self: &Rc<Self>, d: &GPU<D>, ) -> GenericCallback<WebGPUAdapterResponse>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.