#[repr(C)]pub struct GPUDevice {
eventtarget: EventTarget,
channel: WebGPU,
adapter: Dom<GPUAdapter>,
extensions: Heap<*mut JSObject>,
features: Dom<GPUSupportedFeatures>,
limits: Dom<GPUSupportedLimits>,
label: DomRefCell<USVString>,
device: WebGPUDevice,
default_queue: Dom<GPUQueue>,
scope_context: DomRefCell<ScopeContext>,
lost_promise: DomRefCell<Option<Rc<Promise>>>,
valid: Cell<bool>,
}
Fields§
§eventtarget: EventTarget
§channel: WebGPU
§adapter: Dom<GPUAdapter>
§extensions: Heap<*mut JSObject>
§features: Dom<GPUSupportedFeatures>
§limits: Dom<GPUSupportedLimits>
§label: DomRefCell<USVString>
§device: WebGPUDevice
§default_queue: Dom<GPUQueue>
§scope_context: DomRefCell<ScopeContext>
§lost_promise: DomRefCell<Option<Rc<Promise>>>
§valid: Cell<bool>
Implementations§
source§impl GPUDevice
impl GPUDevice
fn __assert_parent_type(&self)
source§impl GPUDevice
impl GPUDevice
fn new_inherited( channel: WebGPU, adapter: &GPUAdapter, extensions: Heap<*mut JSObject>, features: &GPUSupportedFeatures, limits: &GPUSupportedLimits, device: WebGPUDevice, queue: &GPUQueue, label: String ) -> Self
pub fn new( global: &GlobalScope, channel: WebGPU, adapter: &GPUAdapter, extensions: Heap<*mut JSObject>, features: Features, limits: Limits, device: WebGPUDevice, queue: WebGPUQueue, label: String ) -> Root<Dom<Self>>
source§impl GPUDevice
impl GPUDevice
pub fn id(&self) -> WebGPUDevice
pub fn handle_server_msg( &self, scope: Option<ErrorScopeId>, result: WebGPUOpResult )
fn handle_error(&self, scope: ErrorScopeId, error: GPUError)
fn try_remove_scope(&self, scope: ErrorScopeId)
fn fire_uncaptured_error(&self, err: GPUError)
pub fn use_current_scope(&self) -> Option<ErrorScopeId>
fn get_pipeline_layout_data( &self, layout: &GPUPipelineLayoutOrGPUAutoLayoutMode ) -> (Option<PipelineLayoutId>, Option<(PipelineLayoutId, Vec<BindGroupLayoutId>)>, Vec<WebGPUBindGroupLayout>)
sourcepub fn lose(&self, reason: GPUDeviceLostReason)
pub fn lose(&self, reason: GPUDeviceLostReason)
Trait Implementations§
source§impl Castable for GPUDevice
impl Castable for GPUDevice
source§impl DomObjectWrap for GPUDevice
impl DomObjectWrap for GPUDevice
source§const WRAP: unsafe fn(_: SafeJSContext, _: &GlobalScope, _: Option<HandleObject<'_>>, _: Box<Self>) -> Root<Dom<Self>> = {dom::bindings::codegen::Bindings::WebGPUBinding::GPUDevice_Binding::Wrap as for<'a, 'b> unsafe fn(script_runtime::JSContext, &'a dom::globalscope::GlobalScope, std::option::Option<js::rust::Handle<'b, *mut js::jsapi::JSObject>>, std::boxed::Box<dom::gpudevice::GPUDevice>) -> dom::bindings::root::Root<dom::bindings::root::Dom<dom::gpudevice::GPUDevice>>}
const WRAP: unsafe fn(_: SafeJSContext, _: &GlobalScope, _: Option<HandleObject<'_>>, _: Box<Self>) -> Root<Dom<Self>> = {dom::bindings::codegen::Bindings::WebGPUBinding::GPUDevice_Binding::Wrap as for<'a, 'b> unsafe fn(script_runtime::JSContext, &'a dom::globalscope::GlobalScope, std::option::Option<js::rust::Handle<'b, *mut js::jsapi::JSObject>>, std::boxed::Box<dom::gpudevice::GPUDevice>) -> dom::bindings::root::Root<dom::bindings::root::Dom<dom::gpudevice::GPUDevice>>}
Function pointer to the general wrap function type
source§impl GPUDeviceMethods for GPUDevice
impl GPUDeviceMethods for GPUDevice
source§fn CreateBuffer(
&self,
descriptor: &GPUBufferDescriptor
) -> Result<Root<Dom<GPUBuffer>>, Error>
fn CreateBuffer( &self, descriptor: &GPUBufferDescriptor ) -> Result<Root<Dom<GPUBuffer>>, Error>
source§fn CreateBindGroupLayout(
&self,
descriptor: &GPUBindGroupLayoutDescriptor
) -> Root<Dom<GPUBindGroupLayout>>
fn CreateBindGroupLayout( &self, descriptor: &GPUBindGroupLayoutDescriptor ) -> Root<Dom<GPUBindGroupLayout>>
source§fn CreatePipelineLayout(
&self,
descriptor: &GPUPipelineLayoutDescriptor
) -> Root<Dom<GPUPipelineLayout>>
fn CreatePipelineLayout( &self, descriptor: &GPUPipelineLayoutDescriptor ) -> Root<Dom<GPUPipelineLayout>>
source§fn CreateBindGroup(
&self,
descriptor: &GPUBindGroupDescriptor
) -> Root<Dom<GPUBindGroup>>
fn CreateBindGroup( &self, descriptor: &GPUBindGroupDescriptor ) -> Root<Dom<GPUBindGroup>>
source§fn CreateShaderModule(
&self,
descriptor: RootedTraceableBox<GPUShaderModuleDescriptor>
) -> Root<Dom<GPUShaderModule>>
fn CreateShaderModule( &self, descriptor: RootedTraceableBox<GPUShaderModuleDescriptor> ) -> Root<Dom<GPUShaderModule>>
source§fn CreateComputePipeline(
&self,
descriptor: &GPUComputePipelineDescriptor
) -> Root<Dom<GPUComputePipeline>>
fn CreateComputePipeline( &self, descriptor: &GPUComputePipelineDescriptor ) -> Root<Dom<GPUComputePipeline>>
source§fn CreateComputePipelineAsync(
&self,
descriptor: &GPUComputePipelineDescriptor,
comp: InRealm<'_>
) -> Rc<Promise>
fn CreateComputePipelineAsync( &self, descriptor: &GPUComputePipelineDescriptor, comp: InRealm<'_> ) -> Rc<Promise>
source§fn CreateCommandEncoder(
&self,
descriptor: &GPUCommandEncoderDescriptor
) -> Root<Dom<GPUCommandEncoder>>
fn CreateCommandEncoder( &self, descriptor: &GPUCommandEncoderDescriptor ) -> Root<Dom<GPUCommandEncoder>>
source§fn CreateTexture(
&self,
descriptor: &GPUTextureDescriptor
) -> Root<Dom<GPUTexture>>
fn CreateTexture( &self, descriptor: &GPUTextureDescriptor ) -> Root<Dom<GPUTexture>>
source§fn CreateSampler(
&self,
descriptor: &GPUSamplerDescriptor
) -> Root<Dom<GPUSampler>>
fn CreateSampler( &self, descriptor: &GPUSamplerDescriptor ) -> Root<Dom<GPUSampler>>
source§fn CreateRenderPipeline(
&self,
descriptor: &GPURenderPipelineDescriptor
) -> Root<Dom<GPURenderPipeline>>
fn CreateRenderPipeline( &self, descriptor: &GPURenderPipelineDescriptor ) -> Root<Dom<GPURenderPipeline>>
source§fn CreateRenderPipelineAsync(
&self,
descriptor: &GPURenderPipelineDescriptor,
comp: InRealm<'_>
) -> Rc<Promise>
fn CreateRenderPipelineAsync( &self, descriptor: &GPURenderPipelineDescriptor, comp: InRealm<'_> ) -> Rc<Promise>
source§fn CreateRenderBundleEncoder(
&self,
descriptor: &GPURenderBundleEncoderDescriptor
) -> Root<Dom<GPURenderBundleEncoder>>
fn CreateRenderBundleEncoder( &self, descriptor: &GPURenderBundleEncoderDescriptor ) -> Root<Dom<GPURenderBundleEncoder>>
source§fn PushErrorScope(&self, filter: GPUErrorFilter)
fn PushErrorScope(&self, filter: GPUErrorFilter)
fn GetOnuncapturederror(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnuncapturederror(&self, listener: Option<Rc<EventHandlerNonNull>>)
source§impl HasParent for GPUDevice
impl HasParent for GPUDevice
source§fn as_parent(&self) -> &EventTarget
fn as_parent(&self) -> &EventTarget
This is used in a type assertion to ensure that the source and webidls agree as to what the parent type is
type Parent = EventTarget
source§impl IDLInterface for GPUDevice
impl IDLInterface for GPUDevice
source§impl MallocSizeOf for GPUDevice
impl MallocSizeOf for GPUDevice
source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
source§impl MutDomObject for GPUDevice
impl MutDomObject for GPUDevice
source§unsafe fn init_reflector(&self, obj: *mut JSObject)
unsafe fn init_reflector(&self, obj: *mut JSObject)
Initializes the Reflector
source§impl PartialEq<GPUDevice> for GPUDevice
impl PartialEq<GPUDevice> for GPUDevice
source§impl ToJSValConvertible for GPUDevice
impl ToJSValConvertible for GPUDevice
impl DerivedFrom<EventTarget> for GPUDevice
Auto Trait Implementations§
impl !RefUnwindSafe for GPUDevice
impl !Send for GPUDevice
impl !Sync for GPUDevice
impl Unpin for GPUDevice
impl !UnwindSafe for GPUDevice
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>where
F: FnOnce(&Self) -> bool,
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>where F: FnOnce(&Self) -> bool,
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> MaybeBoxed<Box<T, Global>> for T
impl<T> MaybeBoxed<Box<T, Global>> for T
source§fn maybe_boxed(self) -> Box<T, Global>
fn maybe_boxed(self) -> Box<T, Global>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert