pub struct SurfaceTexture {
pub texture: Texture,
pub(crate) presented: bool,
pub(crate) detail: DispatchSurfaceOutputDetail,
}Expand description
Surface texture that can be rendered to.
Result of a successful call to Surface::get_current_texture.
This type is unique to the Rust API of wgpu. In the WebGPU specification,
the GPUCanvasContext provides
a texture without any additional information.
Fields§
§texture: TextureAccessible view of the frame.
presented: bool§detail: DispatchSurfaceOutputDetailImplementations§
Source§impl SurfaceTexture
impl SurfaceTexture
Sourcepub fn as_custom<T: SurfaceOutputDetailInterface>(&self) -> Option<&T>
Available on custom only.
pub fn as_custom<T: SurfaceOutputDetailInterface>(&self) -> Option<&T>
custom only.Returns custom implementation of SurfaceTexture (if custom backend and is internally T)
Trait Implementations§
Source§impl Clone for SurfaceTexture
impl Clone for SurfaceTexture
Source§fn clone(&self) -> SurfaceTexture
fn clone(&self) -> SurfaceTexture
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 SurfaceTexture
impl Debug for SurfaceTexture
Source§impl Drop for SurfaceTexture
impl Drop for SurfaceTexture
Source§impl Hash for SurfaceTexture
impl Hash for SurfaceTexture
Source§impl Ord for SurfaceTexture
impl Ord for SurfaceTexture
Source§impl PartialEq for SurfaceTexture
impl PartialEq for SurfaceTexture
Source§impl PartialOrd for SurfaceTexture
impl PartialOrd for SurfaceTexture
impl Eq for SurfaceTexture
Auto Trait Implementations§
impl Freeze for SurfaceTexture
impl !RefUnwindSafe for SurfaceTexture
impl Send for SurfaceTexture
impl Sync for SurfaceTexture
impl Unpin for SurfaceTexture
impl !UnwindSafe for SurfaceTexture
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more