GpuPowerPreference

Enum GpuPowerPreference 

Source
#[non_exhaustive]
#[repr(u32)]
pub enum GpuPowerPreference { LowPower = 0, HighPerformance = 1, }
Expand description

The GpuPowerPreference enum.

This API requires the following crate features to be activated: GpuPowerPreference

This API is unstable and requires --cfg=web_sys_unstable_apis to be activated, as described in the wasm-bindgen guide

Variants (Non-exhaustive)Β§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Β§

LowPower = 0

Β§

HighPerformance = 1

ImplementationsΒ§

Trait ImplementationsΒ§

SourceΒ§

impl Clone for GpuPowerPreference

SourceΒ§

fn clone(&self) -> GpuPowerPreference

Returns a duplicate of the value. Read more
1.0.0 Β· SourceΒ§

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

Performs copy-assignment from source. Read more
SourceΒ§

impl Debug for GpuPowerPreference

SourceΒ§

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

Formats the value using the given formatter. Read more
SourceΒ§

impl From<GpuPowerPreference> for JsValue

SourceΒ§

fn from(val: GpuPowerPreference) -> Self

Converts to this type from the input type.
SourceΒ§

impl FromWasmAbi for GpuPowerPreference

SourceΒ§

type Abi = u32

The Wasm ABI type that this converts from when coming back out from the ABI boundary.
SourceΒ§

unsafe fn from_abi(val: u32) -> Self

Recover a Self from Self::Abi. Read more
SourceΒ§

impl IntoWasmAbi for GpuPowerPreference

SourceΒ§

type Abi = u32

The Wasm ABI type that this converts into when crossing the ABI boundary.
SourceΒ§

fn into_abi(self) -> u32

Convert self into Self::Abi so that it can be sent across the wasm ABI boundary.
SourceΒ§

impl OptionFromWasmAbi for GpuPowerPreference

SourceΒ§

fn is_none(val: &u32) -> bool

Tests whether the argument is a β€œnone” instance. If so it will be deserialized as None, and otherwise it will be passed to FromWasmAbi.
SourceΒ§

impl OptionIntoWasmAbi for GpuPowerPreference

SourceΒ§

fn none() -> Self::Abi

Returns an ABI instance indicating β€œnone”, which JS will interpret as the None branch of this option. Read more
SourceΒ§

impl PartialEq for GpuPowerPreference

SourceΒ§

fn eq(&self, other: &GpuPowerPreference) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 Β· SourceΒ§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
SourceΒ§

impl WasmDescribe for GpuPowerPreference

SourceΒ§

impl Copy for GpuPowerPreference

SourceΒ§

impl Eq for GpuPowerPreference

SourceΒ§

impl StructuralPartialEq for GpuPowerPreference

Auto Trait ImplementationsΒ§

Blanket ImplementationsΒ§

SourceΒ§

impl<T> Any for T
where T: 'static + ?Sized,

SourceΒ§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
SourceΒ§

impl<T> Borrow<T> for T
where T: ?Sized,

SourceΒ§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
SourceΒ§

impl<T> BorrowMut<T> for T
where T: ?Sized,

SourceΒ§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
SourceΒ§

impl<T> CloneToUninit for T
where T: Clone,

SourceΒ§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

πŸ”¬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
SourceΒ§

impl<T> From<T> for T

SourceΒ§

fn from(t: T) -> T

Returns the argument unchanged.

SourceΒ§

impl<T, U> Into<U> for T
where U: From<T>,

SourceΒ§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

SourceΒ§

impl<T> ReturnWasmAbi for T
where T: IntoWasmAbi,

SourceΒ§

type Abi = <T as IntoWasmAbi>::Abi

Same as IntoWasmAbi::Abi
SourceΒ§

fn return_abi(self) -> <T as ReturnWasmAbi>::Abi

Same as IntoWasmAbi::into_abi, except that it may throw and never return in the case of Err.
SourceΒ§

impl<T> ToOwned for T
where T: Clone,

SourceΒ§

type Owned = T

The resulting type after obtaining ownership.
SourceΒ§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
SourceΒ§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
SourceΒ§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

SourceΒ§

type Error = Infallible

The type returned in the event of a conversion error.
SourceΒ§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
SourceΒ§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

SourceΒ§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
SourceΒ§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.