Struct wgpu_types::RequestAdapterOptions
source · #[repr(C)]pub struct RequestAdapterOptions<S> {
pub power_preference: PowerPreference,
pub force_fallback_adapter: bool,
pub compatible_surface: Option<S>,
}
Expand description
Options for requesting adapter.
Corresponds to WebGPU GPURequestAdapterOptions
.
Fields§
§power_preference: PowerPreference
Power preference for the adapter.
force_fallback_adapter: bool
Indicates that only a fallback adapter can be returned. This is generally a “software” implementation on the system.
compatible_surface: Option<S>
Surface that is required to be presentable with the requested adapter. This does not create the surface, only guarantees that the adapter can present to said surface. For WebGL, this is strictly required, as an adapter can not be created without a surface.
Trait Implementations§
source§impl<S: Clone> Clone for RequestAdapterOptions<S>
impl<S: Clone> Clone for RequestAdapterOptions<S>
source§fn clone(&self) -> RequestAdapterOptions<S>
fn clone(&self) -> RequestAdapterOptions<S>
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<S: Debug> Debug for RequestAdapterOptions<S>
impl<S: Debug> Debug for RequestAdapterOptions<S>
source§impl<S> Default for RequestAdapterOptions<S>
impl<S> Default for RequestAdapterOptions<S>
source§impl<'de, S> Deserialize<'de> for RequestAdapterOptions<S>where
S: Deserialize<'de>,
impl<'de, S> Deserialize<'de> for RequestAdapterOptions<S>where
S: Deserialize<'de>,
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<S: Hash> Hash for RequestAdapterOptions<S>
impl<S: Hash> Hash for RequestAdapterOptions<S>
source§impl<S: PartialEq> PartialEq for RequestAdapterOptions<S>
impl<S: PartialEq> PartialEq for RequestAdapterOptions<S>
source§fn eq(&self, other: &RequestAdapterOptions<S>) -> bool
fn eq(&self, other: &RequestAdapterOptions<S>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<S> Serialize for RequestAdapterOptions<S>where
S: Serialize,
impl<S> Serialize for RequestAdapterOptions<S>where
S: Serialize,
impl<S: Eq> Eq for RequestAdapterOptions<S>
impl<S> StructuralEq for RequestAdapterOptions<S>
impl<S> StructuralPartialEq for RequestAdapterOptions<S>
Auto Trait Implementations§
impl<S> RefUnwindSafe for RequestAdapterOptions<S>where
S: RefUnwindSafe,
impl<S> Send for RequestAdapterOptions<S>where
S: Send,
impl<S> Sync for RequestAdapterOptions<S>where
S: Sync,
impl<S> Unpin for RequestAdapterOptions<S>where
S: Unpin,
impl<S> UnwindSafe for RequestAdapterOptions<S>where
S: UnwindSafe,
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