pub struct Backends { /* private fields */ }Expand description
Represents the backends that wgpu will use.
Implementations§
Source§impl Backends
impl Backends
Sourcepub const VULKAN: Backends
pub const VULKAN: Backends
Supported on Windows, Linux/Android, and macOS/iOS via Vulkan Portability (with the Vulkan feature enabled)
Sourcepub const BROWSER_WEBGPU: Backends
pub const BROWSER_WEBGPU: Backends
Supported when targeting the web through webassembly
Sourcepub const PRIMARY: Backends
pub const PRIMARY: Backends
All the apis that wgpu offers first tier of support for.
Vulkan + Metal + DX12 + Browser WebGPU
Sourcepub const SECONDARY: Backends
pub const SECONDARY: Backends
All the apis that wgpu offers second tier of support for. These may be unsupported/still experimental.
OpenGL + DX11
Sourcepub fn from_bits(bits: u32) -> Option<Backends>
pub fn from_bits(bits: u32) -> Option<Backends>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
Sourcepub const fn from_bits_truncate(bits: u32) -> Backends
pub const fn from_bits_truncate(bits: u32) -> Backends
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
Sourcepub const unsafe fn from_bits_unchecked(bits: u32) -> Backends
pub const unsafe fn from_bits_unchecked(bits: u32) -> Backends
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
Sourcepub const fn intersects(&self, other: Backends) -> bool
pub const fn intersects(&self, other: Backends) -> bool
Returns true if there are flags common to both self and other.
Trait Implementations§
Source§impl BitAndAssign for Backends
impl BitAndAssign for Backends
Source§fn bitand_assign(&mut self, other: Backends)
fn bitand_assign(&mut self, other: Backends)
Disables all flags disabled in the set.
Source§impl BitOrAssign for Backends
impl BitOrAssign for Backends
Source§fn bitor_assign(&mut self, other: Backends)
fn bitor_assign(&mut self, other: Backends)
Adds the set of flags.
Source§impl BitXorAssign for Backends
impl BitXorAssign for Backends
Source§fn bitxor_assign(&mut self, other: Backends)
fn bitxor_assign(&mut self, other: Backends)
Toggles the set of flags.
Source§impl Extend<Backends> for Backends
impl Extend<Backends> for Backends
Source§fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = Backends>,
fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = Backends>,
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)Source§impl FromIterator<Backends> for Backends
impl FromIterator<Backends> for Backends
Source§impl Ord for Backends
impl Ord for Backends
Source§impl PartialOrd for Backends
impl PartialOrd for Backends
Source§impl SubAssign for Backends
impl SubAssign for Backends
Source§fn sub_assign(&mut self, other: Backends)
fn sub_assign(&mut self, other: Backends)
Disables all flags enabled in the set.
impl Copy for Backends
impl Eq for Backends
impl StructuralPartialEq for Backends
Auto Trait Implementations§
impl Freeze for Backends
impl RefUnwindSafe for Backends
impl Send for Backends
impl Sync for Backends
impl Unpin for Backends
impl UnwindSafe for Backends
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
Source§impl<T> CallHasher for Twhere
T: Hash,
impl<T> CallHasher for Twhere
T: Hash,
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.