1pub trait Marker: 'static + crate::WasmNotSendSync {
6 const TYPE: &'static str;
7}
8
9#[cfg(test)]
14impl Marker for () {
15 const TYPE: &'static str = "Untyped";
16}
17
18macro_rules! ids {
20 ($(
21 $(#[$($meta:meta)*])*
22 pub type $marker:ident;
23 )*) => {
24 pub mod markers {
26 $(
27 #[derive(Debug)]
28 pub enum $marker {}
29 impl super::Marker for $marker {
30 const TYPE: &'static str = stringify!($marker);
31 }
32 )*
33 }
34 }
35}
36
37ids! {
38 pub type Adapter;
39 pub type Surface;
40 pub type Device;
41 pub type Queue;
42 pub type Buffer;
43 pub type StagingBuffer;
44 pub type TextureView;
45 pub type Texture;
46 pub type ExternalTexture;
47 pub type Sampler;
48 pub type BindGroupLayout;
49 pub type PipelineLayout;
50 pub type BindGroup;
51 pub type ShaderModule;
52 pub type RenderPipeline;
53 pub type ComputePipeline;
54 pub type PipelineCache;
55 pub type CommandEncoder;
56 pub type CommandBuffer;
57 pub type RenderPassEncoder;
58 pub type ComputePassEncoder;
59 pub type RenderBundleEncoder;
60 pub type RenderBundle;
61 pub type QuerySet;
62 pub type Blas;
63 pub type Tlas;
64}