pub struct WebGpuOwnedTextureFrameHandle { /* private fields */ }Expand description
RAII guard for an acquired WebGPU session-owned texture frame.
Releasing the guard ends the borrow of the backend WebGPU texture, texture view, and device.
Implementations§
Source§impl WebGpuOwnedTextureFrameHandle
impl WebGpuOwnedTextureFrameHandle
Sourcepub fn frame(&self) -> Result<&WebGpuOwnedTextureFrame>
pub fn frame(&self) -> Result<&WebGpuOwnedTextureFrame>
Returns copied metadata for this acquired frame.
Sourcepub unsafe fn texture(&self) -> Result<FrameNativePointer<'_>>
pub unsafe fn texture(&self) -> Result<FrameNativePointer<'_>>
Returns the borrowed WebGPU texture pointer for backend interop.
§Safety
The returned pointer is valid only while this frame handle remains open. The caller must not store or use it after frame release and must satisfy WebGPU synchronization and thread-affinity requirements.
Sourcepub unsafe fn texture_view(&self) -> Result<FrameNativePointer<'_>>
pub unsafe fn texture_view(&self) -> Result<FrameNativePointer<'_>>
Returns the borrowed WebGPU texture view pointer for backend interop.
§Safety
The returned pointer has the same lifetime and synchronization
requirements as WebGpuOwnedTextureFrameHandle::texture.
Sourcepub unsafe fn device(&self) -> Result<FrameNativePointer<'_>>
pub unsafe fn device(&self) -> Result<FrameNativePointer<'_>>
Returns the borrowed WebGPU device pointer for backend interop.
§Safety
The returned pointer has the same lifetime and synchronization
requirements as WebGpuOwnedTextureFrameHandle::texture.
Sourcepub fn close(self) -> Result<(), HandleOperationError<Self>>
pub fn close(self) -> Result<(), HandleOperationError<Self>>
Explicitly releases this frame.