pub struct ContextOptions {
pub device_label: String,
pub backends: Option<Backends>,
}Expand description
How a RenderContext should build its instance and request its device.
Every field has a working default, so ContextOptions::default() is the
ordinary construction — a field exists here only where a host genuinely has
a choice to make, and RenderContext::new takes the defaults.
Fields§
§device_label: StringDebug label attached to the created wgpu::Device, surfaced by graphics
debuggers and in validation messages.
backends: Option<Backends>Backends the wgpu::Instance is restricted to. None — the default —
takes wgpu::Backends::from_env() (the WGPU_BACKEND knob) and falls
back to every backend compiled in, which is what a shell wants. A
headless caller that must pin one backend regardless of the ambient
environment sets it explicitly.
Trait Implementations§
Source§impl Clone for ContextOptions
impl Clone for ContextOptions
Source§impl Debug for ContextOptions
impl Debug for ContextOptions
Source§impl Default for ContextOptions
impl Default for ContextOptions
impl Eq for ContextOptions
Source§impl PartialEq for ContextOptions
impl PartialEq for ContextOptions
impl StructuralPartialEq for ContextOptions
Auto Trait Implementations§
impl Freeze for ContextOptions
impl RefUnwindSafe for ContextOptions
impl Send for ContextOptions
impl Sync for ContextOptions
impl Unpin for ContextOptions
impl UnsafeUnpin for ContextOptions
impl UnwindSafe for ContextOptions
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.