pub struct WasmGpuDevice {
pub adapter_name: String,
/* private fields */
}Expand description
A WebGPU device obtained from the browser’s navigator.gpu API.
Wraps the wgpu adapter and device objects and provides async construction
methods appropriate for the browser environment.
Fields§
§adapter_name: StringHuman-readable adapter name.
Implementations§
Source§impl WasmGpuDevice
impl WasmGpuDevice
Sourcepub async fn from_adapter(
instance: Instance,
adapter: Adapter,
) -> WebGpuResult<Self>
pub async fn from_adapter( instance: Instance, adapter: Adapter, ) -> WebGpuResult<Self>
Create a new WasmGpuDevice from an already-obtained adapter.
This is the async path used by browser callers. On native targets this may not be exercised directly, but it is the intended entry point for WASM builds.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WasmGpuDevice
impl !RefUnwindSafe for WasmGpuDevice
impl Send for WasmGpuDevice
impl Sync for WasmGpuDevice
impl Unpin for WasmGpuDevice
impl UnsafeUnpin for WasmGpuDevice
impl !UnwindSafe for WasmGpuDevice
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