#[non_exhaustive]pub struct WebGpuSurfaceDescriptor {
pub extent: RenderTargetExtent,
pub context: WebGpuContextDescriptor,
pub surface: NativePointer,
pub format: u32,
}Expand description
WebGPU native surface session attachment options.
The surface is borrowed: the host creates it from whatever it presents to, which in a browser is a canvas, and keeps it alive for the session. The format is the host’s too, because a surface reports what it supports through its adapter, which this descriptor does not carry.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.extent: RenderTargetExtent§context: WebGpuContextDescriptor§surface: NativePointer§format: u32Implementations§
Source§impl WebGpuSurfaceDescriptor
impl WebGpuSurfaceDescriptor
pub fn new( extent: RenderTargetExtent, context: WebGpuContextDescriptor, surface: NativePointer, format: u32, ) -> Self
Trait Implementations§
Source§impl Clone for WebGpuSurfaceDescriptor
impl Clone for WebGpuSurfaceDescriptor
Source§fn clone(&self) -> WebGpuSurfaceDescriptor
fn clone(&self) -> WebGpuSurfaceDescriptor
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WebGpuSurfaceDescriptor
impl Debug for WebGpuSurfaceDescriptor
Source§impl PartialEq for WebGpuSurfaceDescriptor
impl PartialEq for WebGpuSurfaceDescriptor
impl StructuralPartialEq for WebGpuSurfaceDescriptor
Auto Trait Implementations§
impl Freeze for WebGpuSurfaceDescriptor
impl RefUnwindSafe for WebGpuSurfaceDescriptor
impl !Send for WebGpuSurfaceDescriptor
impl !Sync for WebGpuSurfaceDescriptor
impl Unpin for WebGpuSurfaceDescriptor
impl UnsafeUnpin for WebGpuSurfaceDescriptor
impl UnwindSafe for WebGpuSurfaceDescriptor
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