wgpu_core::resource

Trait Resource

Source
pub trait Resource {
    const TYPE: &'static str;

    // Required method
    fn life_guard(&self) -> &LifeGuard;

    // Provided method
    fn label(&self) -> &str { ... }
}

Required Associated Constants§

Source

const TYPE: &'static str

Required Methods§

Provided Methods§

Source

fn label(&self) -> &str

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.

Implementors§

Source§

impl Resource for Surface

Source§

const TYPE: &'static str = "Surface"

Source§

impl<A: Api> Resource for BindGroupLayout<A>

Source§

const TYPE: &'static str = "BindGroupLayout"

Source§

impl<A: Api> Resource for PipelineLayout<A>

Source§

const TYPE: &'static str = "PipelineLayout"

Source§

impl<A: Api> Resource for Adapter<A>

Source§

const TYPE: &'static str = "Adapter"

Source§

impl<A: Api> Resource for ComputePipeline<A>

Source§

const TYPE: &'static str = "ComputePipeline"

Source§

impl<A: Api> Resource for RenderPipeline<A>

Source§

const TYPE: &'static str = "RenderPipeline"

Source§

impl<A: Api> Resource for ShaderModule<A>

Source§

const TYPE: &'static str = "ShaderModule"

Source§

impl<A: Api> Resource for Buffer<A>

Source§

const TYPE: &'static str = "Buffer"

Source§

impl<A: Api> Resource for QuerySet<A>

Source§

const TYPE: &'static str = "QuerySet"

Source§

impl<A: Api> Resource for Sampler<A>

Source§

const TYPE: &'static str = "Sampler"

Source§

impl<A: Api> Resource for StagingBuffer<A>

Source§

const TYPE: &'static str = "StagingBuffer"

Source§

impl<A: Api> Resource for Texture<A>

Source§

const TYPE: &'static str = "Texture"

Source§

impl<A: Api> Resource for TextureView<A>

Source§

const TYPE: &'static str = "TextureView"

Source§

impl<A: HalApi> Resource for BindGroup<A>

Source§

const TYPE: &'static str = "BindGroup"

Source§

impl<A: HalApi> Resource for CommandBuffer<A>

Source§

const TYPE: &'static str = "CommandBuffer"

Source§

impl<A: HalApi> Resource for RenderBundle<A>

Source§

const TYPE: &'static str = "RenderBundle"

Source§

impl<A: HalApi> Resource for Device<A>

Source§

const TYPE: &'static str = "Device"