Enum wgpu_types::PowerPreference
source · #[repr(C)]pub enum PowerPreference {
None = 0,
LowPower = 1,
HighPerformance = 2,
}
Expand description
Power Preference when choosing a physical adapter.
Corresponds to WebGPU GPUPowerPreference
.
Variants§
None = 0
Power usage is not considered when choosing an adapter.
LowPower = 1
Adapter that uses the least possible power. This is often an integrated GPU.
HighPerformance = 2
Adapter that has the highest performance. This is often a discrete GPU.
Trait Implementations§
source§impl Clone for PowerPreference
impl Clone for PowerPreference
source§fn clone(&self) -> PowerPreference
fn clone(&self) -> PowerPreference
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for PowerPreference
impl Debug for PowerPreference
source§impl Default for PowerPreference
impl Default for PowerPreference
source§fn default() -> PowerPreference
fn default() -> PowerPreference
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for PowerPreference
impl<'de> Deserialize<'de> for PowerPreference
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Hash for PowerPreference
impl Hash for PowerPreference
source§impl PartialEq for PowerPreference
impl PartialEq for PowerPreference
source§fn eq(&self, other: &PowerPreference) -> bool
fn eq(&self, other: &PowerPreference) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for PowerPreference
impl Serialize for PowerPreference
impl Copy for PowerPreference
impl Eq for PowerPreference
impl StructuralPartialEq for PowerPreference
Auto Trait Implementations§
impl Freeze for PowerPreference
impl RefUnwindSafe for PowerPreference
impl Send for PowerPreference
impl Sync for PowerPreference
impl Unpin for PowerPreference
impl UnwindSafe for PowerPreference
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