#[repr(C)]pub struct GPUBuffer {
reflector_: Reflector,
channel: WebGPU,
label: DomRefCell<USVString>,
state: Cell<GPUBufferState>,
buffer: WebGPUBuffer,
device: Dom<GPUDevice>,
size: u64,
map_promise: DomRefCell<Option<Rc<Promise>>>,
map_info: DomRefCell<Option<GPUBufferMapInfo>>,
}
Fields§
§reflector_: Reflector
§channel: WebGPU
§label: DomRefCell<USVString>
§state: Cell<GPUBufferState>
§buffer: WebGPUBuffer
§device: Dom<GPUDevice>
§size: u64
§map_promise: DomRefCell<Option<Rc<Promise>>>
§map_info: DomRefCell<Option<GPUBufferMapInfo>>
Implementations§
source§impl GPUBuffer
impl GPUBuffer
fn __assert_parent_type(&self)
source§impl GPUBuffer
impl GPUBuffer
fn new_inherited(
channel: WebGPU,
buffer: WebGPUBuffer,
device: &GPUDevice,
state: GPUBufferState,
size: u64,
map_info: DomRefCell<Option<GPUBufferMapInfo>>,
label: USVString
) -> Self
pub fn new(
global: &GlobalScope,
channel: WebGPU,
buffer: WebGPUBuffer,
device: &GPUDevice,
state: GPUBufferState,
size: u64,
map_info: DomRefCell<Option<GPUBufferMapInfo>>,
label: USVString
) -> Root<Dom<Self>>
source§impl GPUBuffer
impl GPUBuffer
pub fn id(&self) -> WebGPUBuffer
pub fn state(&self) -> GPUBufferState
Trait Implementations§
source§impl AsyncWGPUListener for GPUBuffer
impl AsyncWGPUListener for GPUBuffer
fn handle_response(&self, response: WebGPUResponseResult, promise: &Rc<Promise>)
source§impl DomObjectWrap for GPUBuffer
impl DomObjectWrap for GPUBuffer
source§const WRAP: unsafe fn(_: SafeJSContext, _: &GlobalScope, _: Option<HandleObject<'_>>, _: Box<Self>) -> Root<Dom<Self>> = {dom::bindings::codegen::Bindings::GPUBufferBinding::GPUBufferBinding::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::gpubuffer::GPUBuffer>) -> dom::bindings::root::Root<dom::bindings::root::Dom<dom::gpubuffer::GPUBuffer>>}
const WRAP: unsafe fn(_: SafeJSContext, _: &GlobalScope, _: Option<HandleObject<'_>>, _: Box<Self>) -> Root<Dom<Self>> = {dom::bindings::codegen::Bindings::GPUBufferBinding::GPUBufferBinding::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::gpubuffer::GPUBuffer>) -> dom::bindings::root::Root<dom::bindings::root::Dom<dom::gpubuffer::GPUBuffer>>}
Function pointer to the general wrap function type
source§impl GPUBufferMethods for GPUBuffer
impl GPUBufferMethods for GPUBuffer
source§fn MapAsync(
&self,
mode: u32,
offset: u64,
size: Option<u64>,
comp: InRealm<'_>
) -> Rc<Promise>
fn MapAsync(
&self,
mode: u32,
offset: u64,
size: Option<u64>,
comp: InRealm<'_>
) -> Rc<Promise>
https://gpuweb.github.io/gpuweb/#dom-gpubuffer-mapasync-offset-size
source§impl IDLInterface for GPUBuffer
impl IDLInterface for GPUBuffer
source§impl MallocSizeOf for GPUBuffer
impl MallocSizeOf for GPUBuffer
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 GPUBuffer
impl MutDomObject for GPUBuffer
source§unsafe fn init_reflector(&self, obj: *mut JSObject)
unsafe fn init_reflector(&self, obj: *mut JSObject)
Initializes the Reflector
source§impl PartialEq<GPUBuffer> for GPUBuffer
impl PartialEq<GPUBuffer> for GPUBuffer
source§impl ToJSValConvertible for GPUBuffer
impl ToJSValConvertible for GPUBuffer
Auto Trait Implementations§
impl !RefUnwindSafe for GPUBuffer
impl !Send for GPUBuffer
impl !Sync for GPUBuffer
impl Unpin for GPUBuffer
impl !UnwindSafe for GPUBuffer
Blanket Implementations§
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> 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