#[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.
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§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> StructuralPartialEq for RequestAdapterOptions<S>
Auto Trait Implementations§
impl<S> Freeze for RequestAdapterOptions<S>where
S: Freeze,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)