Trait wgpu::core::resource::Resource

source ·
pub trait Resource<Id>: 'static + WasmNotSendSync
where Id: TypedId,
{ 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> Resource<Id<BindGroup<Api>>> for BindGroup<A>
where A: HalApi,

source§

const TYPE: &'static str = "BindGroup"

source§

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

source§

const TYPE: &'static str = "BindGroupLayout"

source§

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

source§

const TYPE: &'static str = "PipelineLayout"

source§

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

source§

const TYPE: &'static str = "CommandBuffer"

source§

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

source§

const TYPE: &'static str = "RenderBundle"

source§

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

source§

const TYPE: &'static str = "Queue"

source§

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

source§

const TYPE: &'static str = "Device"

source§

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

source§

const TYPE: &'static str = "Adapter"

source§

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

source§

const TYPE: &'static str = "ComputePipeline"

source§

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

source§

const TYPE: &'static str = "RenderPipeline"

source§

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

source§

const TYPE: &'static str = "ShaderModule"

source§

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

source§

const TYPE: &'static str = "Buffer"

source§

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

source§

const TYPE: &'static str = "QuerySet"

source§

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

source§

const TYPE: &'static str = "Sampler"

source§

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

source§

const TYPE: &'static str = "StagingBuffer"

source§

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

source§

const TYPE: &'static str = "Texture"

source§

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

source§

const TYPE: &'static str = "TextureView"