Struct web_sys::WebGpuDevice
source · #[repr(transparent)]pub struct WebGpuDevice { /* private fields */ }
Expand description
The WebGPUDevice
object
This API requires the following crate features to be activated: WebGpuDevice
Implementations§
source§impl WebGpuDevice
impl WebGpuDevice
sourcepub fn create_attachment_state(&self) -> WebGpuAttachmentState
pub fn create_attachment_state(&self) -> WebGpuAttachmentState
The createAttachmentState()
method
This API requires the following crate features to be activated: WebGpuAttachmentState
, WebGpuDevice
source§impl WebGpuDevice
impl WebGpuDevice
sourcepub fn create_attachment_state_with_descriptor(
&self,
descriptor: &WebGpuAttachmentStateDescriptor
) -> WebGpuAttachmentState
pub fn create_attachment_state_with_descriptor(
&self,
descriptor: &WebGpuAttachmentStateDescriptor
) -> WebGpuAttachmentState
The createAttachmentState()
method
This API requires the following crate features to be activated: WebGpuAttachmentState
, WebGpuAttachmentStateDescriptor
, WebGpuDevice
source§impl WebGpuDevice
impl WebGpuDevice
sourcepub fn create_bind_group(&self) -> WebGpuBindGroup
pub fn create_bind_group(&self) -> WebGpuBindGroup
The createBindGroup()
method
This API requires the following crate features to be activated: WebGpuBindGroup
, WebGpuDevice
source§impl WebGpuDevice
impl WebGpuDevice
sourcepub fn create_bind_group_with_descriptor(
&self,
descriptor: &WebGpuBindGroupDescriptor
) -> WebGpuBindGroup
pub fn create_bind_group_with_descriptor(
&self,
descriptor: &WebGpuBindGroupDescriptor
) -> WebGpuBindGroup
The createBindGroup()
method
This API requires the following crate features to be activated: WebGpuBindGroup
, WebGpuBindGroupDescriptor
, WebGpuDevice
source§impl WebGpuDevice
impl WebGpuDevice
sourcepub fn create_bind_group_layout(&self) -> WebGpuBindGroupLayout
pub fn create_bind_group_layout(&self) -> WebGpuBindGroupLayout
The createBindGroupLayout()
method
This API requires the following crate features to be activated: WebGpuBindGroupLayout
, WebGpuDevice
source§impl WebGpuDevice
impl WebGpuDevice
sourcepub fn create_bind_group_layout_with_descriptor(
&self,
descriptor: &WebGpuBindGroupLayoutDescriptor
) -> WebGpuBindGroupLayout
pub fn create_bind_group_layout_with_descriptor(
&self,
descriptor: &WebGpuBindGroupLayoutDescriptor
) -> WebGpuBindGroupLayout
The createBindGroupLayout()
method
This API requires the following crate features to be activated: WebGpuBindGroupLayout
, WebGpuBindGroupLayoutDescriptor
, WebGpuDevice
source§impl WebGpuDevice
impl WebGpuDevice
sourcepub fn create_blend_state(&self) -> WebGpuBlendState
pub fn create_blend_state(&self) -> WebGpuBlendState
The createBlendState()
method
This API requires the following crate features to be activated: WebGpuBlendState
, WebGpuDevice
source§impl WebGpuDevice
impl WebGpuDevice
sourcepub fn create_blend_state_with_descriptor(
&self,
descriptor: &WebGpuBlendStateDescriptor
) -> WebGpuBlendState
pub fn create_blend_state_with_descriptor(
&self,
descriptor: &WebGpuBlendStateDescriptor
) -> WebGpuBlendState
The createBlendState()
method
This API requires the following crate features to be activated: WebGpuBlendState
, WebGpuBlendStateDescriptor
, WebGpuDevice
source§impl WebGpuDevice
impl WebGpuDevice
sourcepub fn create_buffer(&self) -> WebGpuBuffer
pub fn create_buffer(&self) -> WebGpuBuffer
The createBuffer()
method
This API requires the following crate features to be activated: WebGpuBuffer
, WebGpuDevice
source§impl WebGpuDevice
impl WebGpuDevice
sourcepub fn create_buffer_with_descriptor(
&self,
descriptor: &WebGpuBufferDescriptor
) -> WebGpuBuffer
pub fn create_buffer_with_descriptor(
&self,
descriptor: &WebGpuBufferDescriptor
) -> WebGpuBuffer
The createBuffer()
method
This API requires the following crate features to be activated: WebGpuBuffer
, WebGpuBufferDescriptor
, WebGpuDevice
source§impl WebGpuDevice
impl WebGpuDevice
sourcepub fn create_command_encoder(&self) -> WebGpuCommandEncoder
pub fn create_command_encoder(&self) -> WebGpuCommandEncoder
The createCommandEncoder()
method
This API requires the following crate features to be activated: WebGpuCommandEncoder
, WebGpuDevice
source§impl WebGpuDevice
impl WebGpuDevice
sourcepub fn create_command_encoder_with_descriptor(
&self,
descriptor: &WebGpuCommandEncoderDescriptor
) -> WebGpuCommandEncoder
pub fn create_command_encoder_with_descriptor(
&self,
descriptor: &WebGpuCommandEncoderDescriptor
) -> WebGpuCommandEncoder
The createCommandEncoder()
method
This API requires the following crate features to be activated: WebGpuCommandEncoder
, WebGpuCommandEncoderDescriptor
, WebGpuDevice
source§impl WebGpuDevice
impl WebGpuDevice
sourcepub fn create_compute_pipeline(
&self,
descriptor: &WebGpuComputePipelineDescriptor
) -> WebGpuComputePipeline
pub fn create_compute_pipeline(
&self,
descriptor: &WebGpuComputePipelineDescriptor
) -> WebGpuComputePipeline
The createComputePipeline()
method
This API requires the following crate features to be activated: WebGpuComputePipeline
, WebGpuComputePipelineDescriptor
, WebGpuDevice
source§impl WebGpuDevice
impl WebGpuDevice
sourcepub fn create_depth_stencil_state(&self) -> WebGpuDepthStencilState
pub fn create_depth_stencil_state(&self) -> WebGpuDepthStencilState
The createDepthStencilState()
method
This API requires the following crate features to be activated: WebGpuDepthStencilState
, WebGpuDevice
source§impl WebGpuDevice
impl WebGpuDevice
sourcepub fn create_depth_stencil_state_with_descriptor(
&self,
descriptor: &WebGpuDepthStencilStateDescriptor
) -> WebGpuDepthStencilState
pub fn create_depth_stencil_state_with_descriptor(
&self,
descriptor: &WebGpuDepthStencilStateDescriptor
) -> WebGpuDepthStencilState
The createDepthStencilState()
method
This API requires the following crate features to be activated: WebGpuDepthStencilState
, WebGpuDepthStencilStateDescriptor
, WebGpuDevice
source§impl WebGpuDevice
impl WebGpuDevice
sourcepub fn create_input_state(&self) -> WebGpuInputState
pub fn create_input_state(&self) -> WebGpuInputState
The createInputState()
method
This API requires the following crate features to be activated: WebGpuDevice
, WebGpuInputState
source§impl WebGpuDevice
impl WebGpuDevice
sourcepub fn create_input_state_with_descriptor(
&self,
descriptor: &WebGpuInputStateDescriptor
) -> WebGpuInputState
pub fn create_input_state_with_descriptor(
&self,
descriptor: &WebGpuInputStateDescriptor
) -> WebGpuInputState
The createInputState()
method
This API requires the following crate features to be activated: WebGpuDevice
, WebGpuInputState
, WebGpuInputStateDescriptor
source§impl WebGpuDevice
impl WebGpuDevice
sourcepub fn create_pipeline_layout(&self) -> WebGpuPipelineLayout
pub fn create_pipeline_layout(&self) -> WebGpuPipelineLayout
The createPipelineLayout()
method
This API requires the following crate features to be activated: WebGpuDevice
, WebGpuPipelineLayout
source§impl WebGpuDevice
impl WebGpuDevice
sourcepub fn create_pipeline_layout_with_descriptor(
&self,
descriptor: &WebGpuPipelineLayoutDescriptor
) -> WebGpuPipelineLayout
pub fn create_pipeline_layout_with_descriptor(
&self,
descriptor: &WebGpuPipelineLayoutDescriptor
) -> WebGpuPipelineLayout
The createPipelineLayout()
method
This API requires the following crate features to be activated: WebGpuDevice
, WebGpuPipelineLayout
, WebGpuPipelineLayoutDescriptor
source§impl WebGpuDevice
impl WebGpuDevice
sourcepub fn create_render_pipeline(
&self,
descriptor: &WebGpuRenderPipelineDescriptor
) -> WebGpuRenderPipeline
pub fn create_render_pipeline(
&self,
descriptor: &WebGpuRenderPipelineDescriptor
) -> WebGpuRenderPipeline
The createRenderPipeline()
method
This API requires the following crate features to be activated: WebGpuDevice
, WebGpuRenderPipeline
, WebGpuRenderPipelineDescriptor
source§impl WebGpuDevice
impl WebGpuDevice
sourcepub fn create_sampler(&self) -> WebGpuSampler
pub fn create_sampler(&self) -> WebGpuSampler
The createSampler()
method
This API requires the following crate features to be activated: WebGpuDevice
, WebGpuSampler
source§impl WebGpuDevice
impl WebGpuDevice
sourcepub fn create_sampler_with_descriptor(
&self,
descriptor: &WebGpuSamplerDescriptor
) -> WebGpuSampler
pub fn create_sampler_with_descriptor(
&self,
descriptor: &WebGpuSamplerDescriptor
) -> WebGpuSampler
The createSampler()
method
This API requires the following crate features to be activated: WebGpuDevice
, WebGpuSampler
, WebGpuSamplerDescriptor
source§impl WebGpuDevice
impl WebGpuDevice
sourcepub fn create_shader_module(
&self,
descriptor: &WebGpuShaderModuleDescriptor
) -> WebGpuShaderModule
pub fn create_shader_module(
&self,
descriptor: &WebGpuShaderModuleDescriptor
) -> WebGpuShaderModule
The createShaderModule()
method
This API requires the following crate features to be activated: WebGpuDevice
, WebGpuShaderModule
, WebGpuShaderModuleDescriptor
source§impl WebGpuDevice
impl WebGpuDevice
sourcepub fn create_texture(&self) -> WebGpuTexture
pub fn create_texture(&self) -> WebGpuTexture
The createTexture()
method
This API requires the following crate features to be activated: WebGpuDevice
, WebGpuTexture
source§impl WebGpuDevice
impl WebGpuDevice
sourcepub fn create_texture_with_descriptor(
&self,
descriptor: &WebGpuTextureDescriptor
) -> WebGpuTexture
pub fn create_texture_with_descriptor(
&self,
descriptor: &WebGpuTextureDescriptor
) -> WebGpuTexture
The createTexture()
method
This API requires the following crate features to be activated: WebGpuDevice
, WebGpuTexture
, WebGpuTextureDescriptor
source§impl WebGpuDevice
impl WebGpuDevice
sourcepub fn extensions(&self) -> WebGpuExtensions
pub fn extensions(&self) -> WebGpuExtensions
The extensions()
method
This API requires the following crate features to be activated: WebGpuDevice
, WebGpuExtensions
source§impl WebGpuDevice
impl WebGpuDevice
sourcepub fn get_object_status_with_web_gpu_buffer(
&self,
obj: &WebGpuBuffer
) -> Promise
pub fn get_object_status_with_web_gpu_buffer(
&self,
obj: &WebGpuBuffer
) -> Promise
The getObjectStatus()
method
This API requires the following crate features to be activated: WebGpuBuffer
, WebGpuDevice
source§impl WebGpuDevice
impl WebGpuDevice
sourcepub fn get_object_status_with_web_gpu_texture(
&self,
obj: &WebGpuTexture
) -> Promise
pub fn get_object_status_with_web_gpu_texture(
&self,
obj: &WebGpuTexture
) -> Promise
The getObjectStatus()
method
This API requires the following crate features to be activated: WebGpuDevice
, WebGpuTexture
source§impl WebGpuDevice
impl WebGpuDevice
sourcepub fn get_queue(&self) -> WebGpuQueue
pub fn get_queue(&self) -> WebGpuQueue
The getQueue()
method
This API requires the following crate features to be activated: WebGpuDevice
, WebGpuQueue
source§impl WebGpuDevice
impl WebGpuDevice
sourcepub fn limits(&self) -> WebGpuLimits
pub fn limits(&self) -> WebGpuLimits
The limits()
method
This API requires the following crate features to be activated: WebGpuDevice
, WebGpuLimits
source§impl WebGpuDevice
impl WebGpuDevice
sourcepub fn adapter(&self) -> WebGpuAdapter
pub fn adapter(&self) -> WebGpuAdapter
The adapter
getter
This API requires the following crate features to be activated: WebGpuAdapter
, WebGpuDevice
source§impl WebGpuDevice
impl WebGpuDevice
source§impl WebGpuDevice
impl WebGpuDevice
sourcepub fn set_on_log(&self, on_log: &Function)
pub fn set_on_log(&self, on_log: &Function)
The onLog
setter
This API requires the following crate features to be activated: WebGpuDevice
Methods from Deref<Target = Object>§
sourcepub fn has_own_property(&self, property: &JsValue) -> bool
pub fn has_own_property(&self, property: &JsValue) -> bool
The hasOwnProperty()
method returns a boolean indicating whether the
object has the specified property as its own property (as opposed to
inheriting it).
sourcepub fn is_prototype_of(&self, value: &JsValue) -> bool
pub fn is_prototype_of(&self, value: &JsValue) -> bool
The isPrototypeOf()
method checks if an object exists in another
object’s prototype chain.
sourcepub fn property_is_enumerable(&self, property: &JsValue) -> bool
pub fn property_is_enumerable(&self, property: &JsValue) -> bool
The propertyIsEnumerable()
method returns a Boolean indicating
whether the specified property is enumerable.
sourcepub fn to_locale_string(&self) -> JsString
pub fn to_locale_string(&self) -> JsString
The toLocaleString()
method returns a string representing the object.
This method is meant to be overridden by derived objects for
locale-specific purposes.
Methods from Deref<Target = JsValue>§
pub const NULL: JsValue = JsValue{ idx: JSIDX_NULL, _marker: marker::PhantomData,}
pub const UNDEFINED: JsValue = JsValue{ idx: JSIDX_UNDEFINED, _marker: marker::PhantomData,}
pub const TRUE: JsValue = JsValue{ idx: JSIDX_TRUE, _marker: marker::PhantomData,}
pub const FALSE: JsValue = JsValue{ idx: JSIDX_FALSE, _marker: marker::PhantomData,}
sourcepub fn as_f64(&self) -> Option<f64>
pub fn as_f64(&self) -> Option<f64>
Returns the f64
value of this JS value if it’s an instance of a
number.
If this JS value is not an instance of a number then this returns
None
.
sourcepub fn as_string(&self) -> Option<String>
pub fn as_string(&self) -> Option<String>
If this JS value is a string value, this function copies the JS string
value into wasm linear memory, encoded as UTF-8, and returns it as a
Rust String
.
To avoid the copying and re-encoding, consider the
JsString::try_from()
function from js-sys
instead.
If this JS value is not an instance of a string or if it’s not valid
utf-8 then this returns None
.
sourcepub fn as_bool(&self) -> Option<bool>
pub fn as_bool(&self) -> Option<bool>
Returns the bool
value of this JS value if it’s an instance of a
boolean.
If this JS value is not an instance of a boolean then this returns
None
.
sourcepub fn is_undefined(&self) -> bool
pub fn is_undefined(&self) -> bool
Tests whether this JS value is undefined
sourcepub fn is_function(&self) -> bool
pub fn is_function(&self) -> bool
Tests whether the type of this JS value is function
.
Trait Implementations§
source§impl AsRef<JsValue> for WebGpuDevice
impl AsRef<JsValue> for WebGpuDevice
source§impl AsRef<Object> for WebGpuDevice
impl AsRef<Object> for WebGpuDevice
source§impl Clone for WebGpuDevice
impl Clone for WebGpuDevice
source§fn clone(&self) -> WebGpuDevice
fn clone(&self) -> WebGpuDevice
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for WebGpuDevice
impl Debug for WebGpuDevice
source§impl Deref for WebGpuDevice
impl Deref for WebGpuDevice
source§impl From<JsValue> for WebGpuDevice
impl From<JsValue> for WebGpuDevice
source§fn from(obj: JsValue) -> WebGpuDevice
fn from(obj: JsValue) -> WebGpuDevice
source§impl From<WebGpuDevice> for JsValue
impl From<WebGpuDevice> for JsValue
source§fn from(obj: WebGpuDevice) -> JsValue
fn from(obj: WebGpuDevice) -> JsValue
source§impl From<WebGpuDevice> for Object
impl From<WebGpuDevice> for Object
source§fn from(obj: WebGpuDevice) -> Object
fn from(obj: WebGpuDevice) -> Object
source§impl FromWasmAbi for WebGpuDevice
impl FromWasmAbi for WebGpuDevice
source§impl<'a> IntoWasmAbi for &'a WebGpuDevice
impl<'a> IntoWasmAbi for &'a WebGpuDevice
source§impl IntoWasmAbi for WebGpuDevice
impl IntoWasmAbi for WebGpuDevice
source§impl JsCast for WebGpuDevice
impl JsCast for WebGpuDevice
source§fn instanceof(val: &JsValue) -> bool
fn instanceof(val: &JsValue) -> bool
instanceof
check to see whether the JsValue
provided is an instance of this type. Read moresource§fn unchecked_from_js(val: JsValue) -> Self
fn unchecked_from_js(val: JsValue) -> Self
source§fn unchecked_from_js_ref(val: &JsValue) -> &Self
fn unchecked_from_js_ref(val: &JsValue) -> &Self
source§fn is_instance_of<T>(&self) -> boolwhere
T: JsCast,
fn is_instance_of<T>(&self) -> boolwhere
T: JsCast,
T
. Read moresource§fn dyn_into<T>(self) -> Result<T, Self>where
T: JsCast,
fn dyn_into<T>(self) -> Result<T, Self>where
T: JsCast,
T
. Read moresource§fn dyn_ref<T>(&self) -> Option<&T>where
T: JsCast,
fn dyn_ref<T>(&self) -> Option<&T>where
T: JsCast,
T
. Read moresource§fn unchecked_into<T>(self) -> Twhere
T: JsCast,
fn unchecked_into<T>(self) -> Twhere
T: JsCast,
source§impl OptionFromWasmAbi for WebGpuDevice
impl OptionFromWasmAbi for WebGpuDevice
source§impl<'a> OptionIntoWasmAbi for &'a WebGpuDevice
impl<'a> OptionIntoWasmAbi for &'a WebGpuDevice
source§impl OptionIntoWasmAbi for WebGpuDevice
impl OptionIntoWasmAbi for WebGpuDevice
source§impl RefFromWasmAbi for WebGpuDevice
impl RefFromWasmAbi for WebGpuDevice
§type Abi = <JsValue as RefFromWasmAbi>::Abi
type Abi = <JsValue as RefFromWasmAbi>::Abi
Self
are recovered from.§type Anchor = ManuallyDrop<WebGpuDevice>
type Anchor = ManuallyDrop<WebGpuDevice>
Self
for the duration of the
invocation of the function that has an &Self
parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous. Read moreAuto Trait Implementations§
impl RefUnwindSafe for WebGpuDevice
impl !Send for WebGpuDevice
impl !Sync for WebGpuDevice
impl Unpin for WebGpuDevice
impl UnwindSafe for WebGpuDevice
Blanket Implementations§
source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
IntoWasmAbi::Abi
source§fn return_abi(self, extra: &mut dyn Stack) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self, extra: &mut dyn Stack) -> <T as ReturnWasmAbi>::Abi
IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
. Read more