pub struct DeviceDescriptor<L> {
pub label: L,
pub required_features: Features,
pub required_limits: Limits,
pub memory_hints: MemoryHints,
pub trace: Trace,
}Expand description
Describes a Device.
Corresponds to WebGPU GPUDeviceDescriptor.
Fields§
§label: LDebug label for the device.
required_features: FeaturesSpecifies the features that are required by the device request. The request will fail if the adapter cannot provide these features.
Exactly the specified set of features, and no more or less, will be allowed in validation of API calls on the resulting device.
required_limits: LimitsSpecifies the limits that are required by the device request. The request will fail if the adapter cannot provide these limits.
Exactly the specified limits, and no better or worse, will be allowed in validation of API calls on the resulting device.
memory_hints: MemoryHintsHints for memory allocation strategies.
trace: TraceWhether API tracing for debugging is enabled, and where the trace is written if so.
Implementations§
Source§impl<L> DeviceDescriptor<L>
impl<L> DeviceDescriptor<L>
Sourcepub fn map_label<K>(&self, fun: impl FnOnce(&L) -> K) -> DeviceDescriptor<K>
pub fn map_label<K>(&self, fun: impl FnOnce(&L) -> K) -> DeviceDescriptor<K>
Takes a closure and maps the label of the device descriptor into another.
Trait Implementations§
Source§impl<L: Clone> Clone for DeviceDescriptor<L>
impl<L: Clone> Clone for DeviceDescriptor<L>
Source§fn clone(&self) -> DeviceDescriptor<L>
fn clone(&self) -> DeviceDescriptor<L>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more