Struct script::dom::gputexture::GPUTexture
source · #[repr(C)]pub struct GPUTexture {
reflector_: Reflector,
texture: WebGPUTexture,
label: DomRefCell<Option<USVString>>,
device: Dom<GPUDevice>,
channel: WebGPU,
texture_size: GPUExtent3DDict,
mip_level_count: u32,
sample_count: u32,
dimension: GPUTextureDimension,
format: GPUTextureFormat,
texture_usage: u32,
destroyed: Cell<bool>,
}
Fields
reflector_: Reflector
texture: WebGPUTexture
label: DomRefCell<Option<USVString>>
device: Dom<GPUDevice>
channel: WebGPU
texture_size: GPUExtent3DDict
mip_level_count: u32
sample_count: u32
dimension: GPUTextureDimension
format: GPUTextureFormat
texture_usage: u32
destroyed: Cell<bool>
Implementations
sourceimpl GPUTexture
impl GPUTexture
fn __assert_parent_type(&self)
sourceimpl GPUTexture
impl GPUTexture
fn new_inherited(
texture: WebGPUTexture,
device: &GPUDevice,
channel: WebGPU,
texture_size: GPUExtent3DDict,
mip_level_count: u32,
sample_count: u32,
dimension: GPUTextureDimension,
format: GPUTextureFormat,
texture_usage: u32,
label: Option<USVString>
) -> Self
pub fn new(
global: &GlobalScope,
texture: WebGPUTexture,
device: &GPUDevice,
channel: WebGPU,
texture_size: GPUExtent3DDict,
mip_level_count: u32,
sample_count: u32,
dimension: GPUTextureDimension,
format: GPUTextureFormat,
texture_usage: u32,
label: Option<USVString>
) -> Root<Dom<Self>>
sourceimpl GPUTexture
impl GPUTexture
pub fn id(&self) -> WebGPUTexture
Trait Implementations
sourceimpl DomObject for GPUTexture
impl DomObject for GPUTexture
sourceimpl DomObjectWrap for GPUTexture
impl DomObjectWrap for GPUTexture
sourceconst WRAP: unsafe fn(_: SafeJSContext, _: &GlobalScope, _: Box<Self>) -> Root<Dom<Self>> = {dom::bindings::codegen::Bindings::GPUTextureBinding::GPUTextureBinding::Wrap as for<'a> unsafe fn(script_runtime::JSContext, &'a dom::globalscope::GlobalScope, std::boxed::Box<dom::gputexture::GPUTexture>) -> dom::bindings::root::Root<dom::bindings::root::Dom<dom::gputexture::GPUTexture>>}
const WRAP: unsafe fn(_: SafeJSContext, _: &GlobalScope, _: Box<Self>) -> Root<Dom<Self>> = {dom::bindings::codegen::Bindings::GPUTextureBinding::GPUTextureBinding::Wrap as for<'a> unsafe fn(script_runtime::JSContext, &'a dom::globalscope::GlobalScope, std::boxed::Box<dom::gputexture::GPUTexture>) -> dom::bindings::root::Root<dom::bindings::root::Dom<dom::gputexture::GPUTexture>>}
Function pointer to the general wrap function type
sourceimpl Drop for GPUTexture
impl Drop for GPUTexture
sourceimpl GPUTextureMethods for GPUTexture
impl GPUTextureMethods for GPUTexture
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 CreateView(
&self,
descriptor: &GPUTextureViewDescriptor
) -> Root<Dom<GPUTextureView>>
fn CreateView(
&self,
descriptor: &GPUTextureViewDescriptor
) -> Root<Dom<GPUTextureView>>
https://gpuweb.github.io/gpuweb/#dom-gputexture-createview
sourceimpl HasParent for GPUTexture
impl HasParent for GPUTexture
sourceimpl IDLInterface for GPUTexture
impl IDLInterface for GPUTexture
sourceimpl JSTraceable for GPUTexture
impl JSTraceable for GPUTexture
sourceimpl MallocSizeOf for GPUTexture
impl MallocSizeOf for GPUTexture
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 GPUTexture
impl MutDomObject for GPUTexture
sourceunsafe fn init_reflector(&self, obj: *mut JSObject)
unsafe fn init_reflector(&self, obj: *mut JSObject)
Initializes the Reflector
sourceimpl PartialEq<GPUTexture> for GPUTexture
impl PartialEq<GPUTexture> for GPUTexture
sourcefn eq(&self, other: &GPUTexture) -> bool
fn eq(&self, other: &GPUTexture) -> bool
sourceimpl ToJSValConvertible for GPUTexture
impl ToJSValConvertible for GPUTexture
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 GPUTexture
impl !Send for GPUTexture
impl !Sync for GPUTexture
impl Unpin for GPUTexture
impl !UnwindSafe for GPUTexture
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