#[repr(transparent)]
pub struct Backends(pub(crate) <Backends as PublicFlags>::Internal);
Expand description

Represents the backends that wgpu will use.

Tuple Fields

0: <Backends as PublicFlags>::Internal

Implementations

Supported on Windows, Linux/Android, and macOS/iOS via Vulkan Portability (with the Vulkan feature enabled)

Supported on Linux/Android, the web through webassembly via WebGL, and Windows and macOS/iOS via ANGLE

Supported on macOS/iOS

Supported on Windows 10

Supported on Windows 7+

Supported when targeting the web through webassembly

All the apis that wgpu offers first tier of support for.

Vulkan + Metal + DX12 + Browser WebGPU

All the apis that wgpu offers second tier of support for. These may be unsupported/still experimental.

OpenGL + DX11

Returns an empty set of flags.

Returns the set containing all flags.

Returns the raw value of the flags currently stored.

Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.

Convert from underlying bit representation, dropping any bits that do not correspond to flags.

Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).

Get the value for a flag from its stringified name.

Names are case-sensitive, so must correspond exactly to the identifier given to the flag.

Returns true if no flags are currently stored.

Returns true if all flags are currently set.

Returns true if there are flags common to both self and other.

Returns true if all of the flags in other are contained within self.

Inserts the specified flags in-place.

This method is equivalent to union.

Removes the specified flags in-place.

This method is equivalent to difference.

Toggles the specified flags in-place.

This method is equivalent to symmetric_difference.

Inserts or removes the specified flags depending on the passed value.

Returns the intersection between the flags in self and other.

Calculating self bitwise and (&) other, including any bits that don’t correspond to a defined flag.

Returns the union of between the flags in self and other.

Calculates self bitwise or (|) other, including any bits that don’t correspond to a defined flag.

Returns the difference between the flags in self and other.

Calculates self bitwise and (&!) the bitwise negation of other, including any bits that don’t correspond to a defined flag.

This method is not equivalent to a & !b when there are bits set that don’t correspond to a defined flag. The ! operator will unset any bits that don’t correspond to a flag, so they’ll always be unset by a &! b, but respected by a.difference(b).

Returns the symmetric difference between the flags in self and other.

Calculates self bitwise exclusive or (^) other, including any bits that don’t correspond to a defined flag.

Returns the complement of this set of flags.

Calculates the bitwise negation (!) of self, unsetting any bits that don’t correspond to a defined flag.

Iterate over enabled flag values.

Iterate over enabled flag values with their stringified names.

Returns true if the bitflags contains bits that are not part of the bitflags definition.

Trait Implementations

Formats the value using the given formatter.

Returns the intersection between the two sets of flags.

The resulting type after applying the & operator.

Disables all flags disabled in the set.

Returns the union of the two sets of flags.

The resulting type after applying the | operator.

Adds the set of flags.

Returns the left flags, but with all the right flags toggled.

The resulting type after applying the ^ operator.

Toggles the set of flags.

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Extends a collection with the contents of an iterator. Read more
🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
The set of available flags and their names.
The underlying storage type.
Returns the raw value of the flags currently stored.
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag). Read more
Returns an empty set of flags.
Returns the set containing all flags.
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag. Read more
Convert from underlying bit representation, dropping any bits that do not correspond to flags. Read more
Get the flag for a particular name.
Iterate over enabled flag values.
Iterate over the raw names and bits for enabled flag values.
Returns true if no flags are currently stored.
Returns true if all flags are currently set.
Returns true if there are flags common to both self and other.
Returns true if all of the flags in other are contained within self.
Inserts the specified flags in-place. Read more
Removes the specified flags in-place. Read more
Toggles the specified flags in-place. Read more
Inserts or removes the specified flags depending on the passed value.
Returns the intersection between the flags in self and other.
Returns the union of between the flags in self and other.
Returns the difference between the flags in self and other.
Returns the symmetric difference between the flags in self and other. Read more
Returns the complement of this set of flags.
Converts to this type from the input type.
Creates a value from an iterator. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
The type of the elements being iterated over.
Which kind of iterator are we turning this into?
Creates an iterator from a value. Read more
Formats the value using the given formatter.

Returns the complement of this set of flags.

The resulting type after applying the ! operator.
Formats the value using the given formatter.
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Returns the set difference of the two sets of flags.

The resulting type after applying the - operator.

Disables all flags enabled in the set.

Formats the value using the given formatter.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
👎Deprecated:

use the Flags trait instead

An iterator over enabled flags in an instance of the type.
👎Deprecated:

use the Flags trait instead

An iterator over the raw names and bits for enabled flags in an instance of the type.
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more
Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more
Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s. Read more
Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s. Read more
Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait. Read more
Compare self to key and return true if they are equal.

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more