pub struct Canvas<'a, H: Handle> { /* private fields */ }
Expand description
A view into a Texture used for reading or writing to it.
Implementations§
source§impl<'a, H: Handle> Canvas<'a, H>
impl<'a, H: Handle> Canvas<'a, H>
sourcepub fn from_raw_parts(handle: &'a H, wgpu_texture: &'a Texture) -> Self
pub fn from_raw_parts(handle: &'a H, wgpu_texture: &'a Texture) -> Self
Creates an Canvas from its raw parts.
NOTE: the provided wgpu::Texture
should have been created from the provided Handle.
Trait Implementations§
source§impl<'a, H: Handle> Texture<H> for Canvas<'a, H>
impl<'a, H: Handle> Texture<H> for Canvas<'a, H>
source§fn wgpu_texture(&self) -> &Texture
fn wgpu_texture(&self) -> &Texture
Returns the
wgpu::Texture
that this Texture wraps.source§fn wgpu_texture_usage(&self) -> TextureUsages
fn wgpu_texture_usage(&self) -> TextureUsages
Auto Trait Implementations§
impl<'a, H> !RefUnwindSafe for Canvas<'a, H>
impl<'a, H> Send for Canvas<'a, H>where H: Sync,
impl<'a, H> Sync for Canvas<'a, H>where H: Sync,
impl<'a, H> Unpin for Canvas<'a, H>
impl<'a, H> !UnwindSafe for Canvas<'a, H>
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