Type Alias nannou_wgpu::DeviceDescriptor

source ·
pub type DeviceDescriptor<'a> = DeviceDescriptor<Option<&'a str>>;
Expand description

Describes a Device.

For use with Adapter::request_device.

Corresponds to WebGPU GPUDeviceDescriptor.

Aliased Type§

struct DeviceDescriptor<'a> {
    pub label: Option<&'a str>,
    pub features: Features,
    pub limits: Limits,
}

Fields§

§label: Option<&'a str>

Debug label for the device.

§features: Features

Features that the device should support. If any feature is not supported by the adapter, creating a device will panic.

§limits: Limits

Limits that the device should support. If any limit is “better” than the limit exposed by the adapter, creating a device will panic.

Implementations

source§

impl<L> DeviceDescriptor<L>

source

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> Debug for DeviceDescriptor<L>
where L: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<L> Default for DeviceDescriptor<L>
where L: Default,

source§

fn default() -> DeviceDescriptor<L>

Returns the “default value” for a type. Read more
source§

impl<L> Clone for DeviceDescriptor<L>
where L: Clone,

source§

fn clone(&self) -> DeviceDescriptor<L>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more