pub struct BackendBit { /* private fields */ }
Expand description
Represents the backends that wgpu will use.
Implementations§
Source§impl BackendBit
impl BackendBit
Sourcepub const VULKAN: BackendBit
pub const VULKAN: BackendBit
Supported on Windows, Linux/Android, and macOS/iOS via Vulkan Portability (with the Vulkan feature enabled)
Sourcepub const GL: BackendBit
pub const GL: BackendBit
Currently unsupported
Sourcepub const METAL: BackendBit
pub const METAL: BackendBit
Supported on macOS/iOS
Sourcepub const DX12: BackendBit
pub const DX12: BackendBit
Supported on Windows 10
Sourcepub const DX11: BackendBit
pub const DX11: BackendBit
Supported on Windows 7+
Sourcepub const BROWSER_WEBGPU: BackendBit
pub const BROWSER_WEBGPU: BackendBit
Supported when targeting the web through webassembly
Sourcepub const PRIMARY: BackendBit
pub const PRIMARY: BackendBit
All the apis that wgpu offers first tier of support for.
Vulkan + Metal + DX12 + Browser WebGPU
Sourcepub const SECONDARY: BackendBit
pub const SECONDARY: BackendBit
All the apis that wgpu offers second tier of support for. These may be unsupported/still experimental.
OpenGL + DX11
Sourcepub const fn empty() -> BackendBit
pub const fn empty() -> BackendBit
Returns an empty set of flags
Sourcepub const fn all() -> BackendBit
pub const fn all() -> BackendBit
Returns the set containing all flags.
Sourcepub fn from_bits(bits: u32) -> Option<BackendBit>
pub fn from_bits(bits: u32) -> Option<BackendBit>
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) -> BackendBit
pub const fn from_bits_truncate(bits: u32) -> BackendBit
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
Sourcepub const unsafe fn from_bits_unchecked(bits: u32) -> BackendBit
pub const unsafe fn from_bits_unchecked(bits: u32) -> BackendBit
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
Sourcepub const fn intersects(&self, other: BackendBit) -> bool
pub const fn intersects(&self, other: BackendBit) -> bool
Returns true
if there are flags common to both self
and other
.
Sourcepub const fn contains(&self, other: BackendBit) -> bool
pub const fn contains(&self, other: BackendBit) -> bool
Returns true
all of the flags in other
are contained within self
.
Sourcepub fn insert(&mut self, other: BackendBit)
pub fn insert(&mut self, other: BackendBit)
Inserts the specified flags in-place.
Sourcepub fn remove(&mut self, other: BackendBit)
pub fn remove(&mut self, other: BackendBit)
Removes the specified flags in-place.
Sourcepub fn toggle(&mut self, other: BackendBit)
pub fn toggle(&mut self, other: BackendBit)
Toggles the specified flags in-place.
Sourcepub fn set(&mut self, other: BackendBit, value: bool)
pub fn set(&mut self, other: BackendBit, value: bool)
Inserts or removes the specified flags depending on the passed value.
Trait Implementations§
Source§impl Binary for BackendBit
impl Binary for BackendBit
Source§impl BitAnd for BackendBit
impl BitAnd for BackendBit
Source§fn bitand(self, other: BackendBit) -> BackendBit
fn bitand(self, other: BackendBit) -> BackendBit
Returns the intersection between the two sets of flags.
Source§type Output = BackendBit
type Output = BackendBit
&
operator.Source§impl BitAndAssign for BackendBit
impl BitAndAssign for BackendBit
Source§fn bitand_assign(&mut self, other: BackendBit)
fn bitand_assign(&mut self, other: BackendBit)
Disables all flags disabled in the set.
Source§impl BitOr for BackendBit
impl BitOr for BackendBit
Source§fn bitor(self, other: BackendBit) -> BackendBit
fn bitor(self, other: BackendBit) -> BackendBit
Returns the union of the two sets of flags.
Source§type Output = BackendBit
type Output = BackendBit
|
operator.Source§impl BitOrAssign for BackendBit
impl BitOrAssign for BackendBit
Source§fn bitor_assign(&mut self, other: BackendBit)
fn bitor_assign(&mut self, other: BackendBit)
Adds the set of flags.
Source§impl BitXor for BackendBit
impl BitXor for BackendBit
Source§fn bitxor(self, other: BackendBit) -> BackendBit
fn bitxor(self, other: BackendBit) -> BackendBit
Returns the left flags, but with all the right flags toggled.
Source§type Output = BackendBit
type Output = BackendBit
^
operator.Source§impl BitXorAssign for BackendBit
impl BitXorAssign for BackendBit
Source§fn bitxor_assign(&mut self, other: BackendBit)
fn bitxor_assign(&mut self, other: BackendBit)
Toggles the set of flags.
Source§impl Clone for BackendBit
impl Clone for BackendBit
Source§fn clone(&self) -> BackendBit
fn clone(&self) -> BackendBit
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for BackendBit
impl Debug for BackendBit
Source§impl<'de> Deserialize<'de> for BackendBit
impl<'de> Deserialize<'de> for BackendBit
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<BackendBit, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<BackendBit, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Extend<BackendBit> for BackendBit
impl Extend<BackendBit> for BackendBit
Source§fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = BackendBit>,
fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = BackendBit>,
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 From<Backend> for BackendBit
impl From<Backend> for BackendBit
Source§fn from(backend: Backend) -> BackendBit
fn from(backend: Backend) -> BackendBit
Source§impl FromIterator<BackendBit> for BackendBit
impl FromIterator<BackendBit> for BackendBit
Source§fn from_iter<T>(iterator: T) -> BackendBitwhere
T: IntoIterator<Item = BackendBit>,
fn from_iter<T>(iterator: T) -> BackendBitwhere
T: IntoIterator<Item = BackendBit>,
Source§impl Hash for BackendBit
impl Hash for BackendBit
Source§impl LowerHex for BackendBit
impl LowerHex for BackendBit
Source§impl Not for BackendBit
impl Not for BackendBit
Source§fn not(self) -> BackendBit
fn not(self) -> BackendBit
Returns the complement of this set of flags.
Source§type Output = BackendBit
type Output = BackendBit
!
operator.Source§impl Octal for BackendBit
impl Octal for BackendBit
Source§impl Ord for BackendBit
impl Ord for BackendBit
Source§fn cmp(&self, other: &BackendBit) -> Ordering
fn cmp(&self, other: &BackendBit) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for BackendBit
impl PartialEq for BackendBit
Source§impl PartialOrd for BackendBit
impl PartialOrd for BackendBit
Source§impl Serialize for BackendBit
impl Serialize for BackendBit
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Source§impl Sub for BackendBit
impl Sub for BackendBit
Source§fn sub(self, other: BackendBit) -> BackendBit
fn sub(self, other: BackendBit) -> BackendBit
Returns the set difference of the two sets of flags.
Source§type Output = BackendBit
type Output = BackendBit
-
operator.Source§impl SubAssign for BackendBit
impl SubAssign for BackendBit
Source§fn sub_assign(&mut self, other: BackendBit)
fn sub_assign(&mut self, other: BackendBit)
Disables all flags enabled in the set.