pub trait Resource<Id: TypedId>: 'static + WasmNotSendSync {
    const TYPE: &'static str;

    // Required methods
    fn as_info(&self) -> &ResourceInfo<Id>;
    fn as_info_mut(&mut self) -> &mut ResourceInfo<Id>;

    // Provided methods
    fn label(&self) -> String { ... }
    fn ref_count(self: &Arc<Self>) -> usize { ... }
    fn is_unique(self: &Arc<Self>) -> bool { ... }
    fn is_equal(&self, other: &Self) -> bool { ... }
}

Required Associated Constants§

source

const TYPE: &'static str

Required Methods§

source

fn as_info(&self) -> &ResourceInfo<Id>

source

fn as_info_mut(&mut self) -> &mut ResourceInfo<Id>

Provided Methods§

source

fn label(&self) -> String

source

fn ref_count(self: &Arc<Self>) -> usize

source

fn is_unique(self: &Arc<Self>) -> bool

source

fn is_equal(&self, other: &Self) -> bool

Object Safety§

This trait is not object safe.

Implementors§

source§

impl Resource<Id<Surface>> for Surface

source§

const TYPE: &'static str = "Surface"

source§

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

source§

const TYPE: &'static str = "BindGroup"

source§

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

source§

const TYPE: &'static str = "BindGroupLayout"

source§

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

source§

const TYPE: &'static str = "PipelineLayout"

source§

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

source§

const TYPE: &'static str = "CommandBuffer"

source§

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

source§

const TYPE: &'static str = "RenderBundle"

source§

impl<A: HalApi> Resource<Id<Device<Api>>> for Queue<A>

source§

const TYPE: &'static str = "Queue"

source§

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

source§

const TYPE: &'static str = "Device"

source§

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

source§

const TYPE: &'static str = "Adapter"

source§

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

source§

const TYPE: &'static str = "ComputePipeline"

source§

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

source§

const TYPE: &'static str = "RenderPipeline"

source§

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

source§

const TYPE: &'static str = "ShaderModule"

source§

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

source§

const TYPE: &'static str = "Buffer"

source§

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

source§

const TYPE: &'static str = "QuerySet"

source§

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

source§

const TYPE: &'static str = "Sampler"

source§

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

source§

const TYPE: &'static str = "StagingBuffer"

source§

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

source§

const TYPE: &'static str = "Texture"

source§

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

source§

const TYPE: &'static str = "TextureView"