pub struct TextureView { /* private fields */ }
Expand description
Handle to a texture view.
A TextureView
object describes a texture and associated metadata needed by a
RenderPipeline
or BindGroup
.
Corresponds to WebGPU GPUTextureView
.
Implementations§
Source§impl TextureView
impl TextureView
Sourcepub fn global_id(&self) -> Id<Self>
pub fn global_id(&self) -> Id<Self>
Returns a globally-unique identifier for this TextureView
.
Calling this method multiple times on the same object will always return the same value.
The returned value is guaranteed to be different for all resources created from the same Instance
.
Sourcepub unsafe fn as_hal<A: HalApi, F: FnOnce(Option<&A::TextureView>) -> R, R>(
&self,
hal_texture_view_callback: F,
) -> R
Available on wgpu_core
only.
pub unsafe fn as_hal<A: HalApi, F: FnOnce(Option<&A::TextureView>) -> R, R>( &self, hal_texture_view_callback: F, ) -> R
wgpu_core
only.Returns the inner hal TextureView using a callback. The hal texture will be None
if the
backend type argument does not match with this wgpu Texture
§Safety
- The raw handle obtained from the hal TextureView must not be manually destroyed
Trait Implementations§
Source§impl Debug for TextureView
impl Debug for TextureView
Auto Trait Implementations§
impl Freeze for TextureView
impl !RefUnwindSafe for TextureView
impl Send for TextureView
impl Sync for TextureView
impl Unpin for TextureView
impl !UnwindSafe for TextureView
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