pub struct NoopBackendOptions {
pub enable: bool,
}
Expand description
Configuration for the noop backend.
Part of BackendOptions
.
Fields§
§enable: bool
Whether to allow the noop backend to be used.
The noop backend stubs out all operations except for buffer creation and mapping, so it must not be used when not expected. Therefore, it will not be used unless explicitly enabled.
Implementations§
source§impl NoopBackendOptions
impl NoopBackendOptions
sourcepub fn from_env_or_default() -> NoopBackendOptions
pub fn from_env_or_default() -> NoopBackendOptions
Choose whether the noop backend is enabled from the environment.
It will be enabled if the environment variable WGPU_NOOP_BACKEND
has the value 1
and not otherwise. Future versions may assign other meanings to other values.
sourcepub fn with_env(self) -> NoopBackendOptions
pub fn with_env(self) -> NoopBackendOptions
Takes the given options, modifies them based on the environment variables, and returns the result.
See from_env_or_default()
for the interpretation.
Trait Implementations§
source§impl Clone for NoopBackendOptions
impl Clone for NoopBackendOptions
source§fn clone(&self) -> NoopBackendOptions
fn clone(&self) -> NoopBackendOptions
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 NoopBackendOptions
impl Debug for NoopBackendOptions
source§impl Default for NoopBackendOptions
impl Default for NoopBackendOptions
source§fn default() -> NoopBackendOptions
fn default() -> NoopBackendOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for NoopBackendOptions
impl RefUnwindSafe for NoopBackendOptions
impl Send for NoopBackendOptions
impl Sync for NoopBackendOptions
impl Unpin for NoopBackendOptions
impl UnwindSafe for NoopBackendOptions
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
)