pub trait GraphicsApi:
Send
+ Sync
+ Debug
+ Default
+ Clone
+ 'static {
// Required method
fn backend() -> Backend;
// Provided method
fn backend_for(_device: &WgpuDevice) -> WgpuBackend { ... }
}Expand description
The basic trait to specify which graphics API to use as Backend.
Options are:
Required Methods§
Provided Methods§
Sourcefn backend_for(_device: &WgpuDevice) -> WgpuBackend
fn backend_for(_device: &WgpuDevice) -> WgpuBackend
The graphics API selection for device, before automatic selection is resolved.
A named API returns its own backend. AutoGraphicsApi returns the device’s backend,
preserving WgpuBackend::Auto when the device does not pin an API.
§Panics
The default implementation rejects the noop backend, which has no WgpuBackend variant.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".