Struct wgpu::TextureView
source · 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
pub unsafe fn as_hal<A: HalApi, F: FnOnce(Option<&A::TextureView>) -> R, R>( &self, hal_texture_view_callback: F ) -> R
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