Struct script::dom::gpuswapchain::GPUSwapChain
source · #[repr(C)]pub struct GPUSwapChain {
reflector_: Reflector,
channel: WebGPU,
label: DomRefCell<Option<USVString>>,
context: Dom<GPUCanvasContext>,
texture: Dom<GPUTexture>,
}
Fields
reflector_: Reflector
channel: WebGPU
label: DomRefCell<Option<USVString>>
context: Dom<GPUCanvasContext>
texture: Dom<GPUTexture>
Implementations
sourceimpl GPUSwapChain
impl GPUSwapChain
fn __assert_parent_type(&self)
sourceimpl GPUSwapChain
impl GPUSwapChain
fn new_inherited(
channel: WebGPU,
context: &GPUCanvasContext,
texture: &GPUTexture,
label: Option<USVString>
) -> Self
pub fn new(
global: &GlobalScope,
channel: WebGPU,
context: &GPUCanvasContext,
texture: &GPUTexture,
label: Option<USVString>
) -> Root<Dom<Self>>
sourceimpl GPUSwapChain
impl GPUSwapChain
pub fn destroy(&self, external_id: u64, image_key: ImageKey)
pub fn texture_id(&self) -> WebGPUTexture
Trait Implementations
sourceimpl DomObject for GPUSwapChain
impl DomObject for GPUSwapChain
sourceimpl DomObjectWrap for GPUSwapChain
impl DomObjectWrap for GPUSwapChain
sourceconst WRAP: unsafe fn(_: SafeJSContext, _: &GlobalScope, _: Box<Self>) -> Root<Dom<Self>> = {dom::bindings::codegen::Bindings::GPUSwapChainBinding::GPUSwapChainBinding::Wrap as for<'a> unsafe fn(script_runtime::JSContext, &'a dom::globalscope::GlobalScope, std::boxed::Box<dom::gpuswapchain::GPUSwapChain>) -> dom::bindings::root::Root<dom::bindings::root::Dom<dom::gpuswapchain::GPUSwapChain>>}
const WRAP: unsafe fn(_: SafeJSContext, _: &GlobalScope, _: Box<Self>) -> Root<Dom<Self>> = {dom::bindings::codegen::Bindings::GPUSwapChainBinding::GPUSwapChainBinding::Wrap as for<'a> unsafe fn(script_runtime::JSContext, &'a dom::globalscope::GlobalScope, std::boxed::Box<dom::gpuswapchain::GPUSwapChain>) -> dom::bindings::root::Root<dom::bindings::root::Dom<dom::gpuswapchain::GPUSwapChain>>}
Function pointer to the general wrap function type
sourceimpl GPUSwapChainMethods for GPUSwapChain
impl GPUSwapChainMethods for GPUSwapChain
sourcefn GetLabel(&self) -> Option<USVString>
fn GetLabel(&self) -> Option<USVString>
https://gpuweb.github.io/gpuweb/#dom-gpuobjectbase-label
sourcefn SetLabel(&self, value: Option<USVString>)
fn SetLabel(&self, value: Option<USVString>)
https://gpuweb.github.io/gpuweb/#dom-gpuobjectbase-label
sourcefn GetCurrentTexture(&self) -> Root<Dom<GPUTexture>>
fn GetCurrentTexture(&self) -> Root<Dom<GPUTexture>>
https://gpuweb.github.io/gpuweb/#dom-gpuswapchain-getcurrenttexture
sourceimpl HasParent for GPUSwapChain
impl HasParent for GPUSwapChain
sourceimpl IDLInterface for GPUSwapChain
impl IDLInterface for GPUSwapChain
sourceimpl JSTraceable for GPUSwapChain
impl JSTraceable for GPUSwapChain
sourceimpl MallocSizeOf for GPUSwapChain
impl MallocSizeOf for GPUSwapChain
sourcefn 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. Read more
sourceimpl MutDomObject for GPUSwapChain
impl MutDomObject for GPUSwapChain
sourceunsafe fn init_reflector(&self, obj: *mut JSObject)
unsafe fn init_reflector(&self, obj: *mut JSObject)
Initializes the Reflector
sourceimpl PartialEq<GPUSwapChain> for GPUSwapChain
impl PartialEq<GPUSwapChain> for GPUSwapChain
sourcefn eq(&self, other: &GPUSwapChain) -> bool
fn eq(&self, other: &GPUSwapChain) -> bool
sourceimpl ToJSValConvertible for GPUSwapChain
impl ToJSValConvertible for GPUSwapChain
sourceunsafe fn to_jsval(&self, cx: *mut JSContext, rval: MutableHandleValue<'_>)
unsafe fn to_jsval(&self, cx: *mut JSContext, rval: MutableHandleValue<'_>)
Convert
self
to a JSVal
. JSAPI failure causes a panic.Auto Trait Implementations
impl !RefUnwindSafe for GPUSwapChain
impl !Send for GPUSwapChain
impl !Sync for GPUSwapChain
impl Unpin for GPUSwapChain
impl !UnwindSafe for GPUSwapChain
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> MaybeBoxed<Box<T, Global>> for T
impl<T> MaybeBoxed<Box<T, Global>> for T
sourcefn maybe_boxed(self) -> Box<T, Global>
fn maybe_boxed(self) -> Box<T, Global>
Convert
sourceimpl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
sourcefn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert