wgpu_core::track

Trait ResourceUses

Source
pub(crate) trait ResourceUses:
    Debug
    + BitAnd<Output = Self>
    + BitOr<Output = Self>
    + PartialEq
    + Sized
    + Copy {
    type Selector: Debug;

    const EXCLUSIVE: Self;

    // Required methods
    fn bits(self) -> u16;
    fn all_ordered(self) -> bool;
    fn any_exclusive(self) -> bool;
}
Expand description

The uses that a resource or subresource can be in.

Required Associated Constants§

Source

const EXCLUSIVE: Self

All flags that are exclusive.

Required Associated Types§

Source

type Selector: Debug

The selector used by this resource.

Required Methods§

Source

fn bits(self) -> u16

Turn the resource into a pile of bits.

Source

fn all_ordered(self) -> bool

Returns true if the all the uses are ordered.

Source

fn any_exclusive(self) -> bool

Returns true if any of the uses are exclusive.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ResourceUses for BufferUses

Source§

const EXCLUSIVE: Self = Self::EXCLUSIVE

Source§

type Selector = ()

Source§

fn bits(self) -> u16

Source§

fn all_ordered(self) -> bool

Source§

fn any_exclusive(self) -> bool

Source§

impl ResourceUses for TextureUses

Source§

const EXCLUSIVE: Self = Self::EXCLUSIVE

Source§

type Selector = TextureSelector

Source§

fn bits(self) -> u16

Source§

fn all_ordered(self) -> bool

Source§

fn any_exclusive(self) -> bool

Implementors§