Skip to main content

GpuFrameParts

Struct GpuFrameParts 

Source
#[non_exhaustive]
pub struct GpuFrameParts<'a> { pub device: &'a Device, pub queue: &'a Queue, pub target: &'a TextureView, pub format: TextureFormat, pub width: u32, pub height: u32, pub scale: f32, pub time: Duration, pub encoder: &'a mut CommandEncoder, pub events: &'a mut Vec<GpuEvent>, }
Expand description

What a frame is made of (GpuFrame::new).

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§device: &'a Device

The device.

§queue: &'a Queue

Its queue.

§target: &'a TextureView

Where the frame is drawn.

§format: TextureFormat

The target’s format.

§width: u32

The target’s width in pixels.

§height: u32

The target’s height in pixels.

§scale: f32

Pixels per point.

§time: Duration

Since the renderer was made.

§encoder: &'a mut CommandEncoder

What the frame is encoded with.

§events: &'a mut Vec<GpuEvent>

Where its events go.

Implementations§

Source§

impl<'a> GpuFrameParts<'a>

Source

pub fn new( device: &'a Device, queue: &'a Queue, target: &'a TextureView, format: TextureFormat, (width, height): (u32, u32), scale: f32, time: Duration, encoder: &'a mut CommandEncoder, events: &'a mut Vec<GpuEvent>, ) -> Self

The parts of a frame of width × height pixels at scale.

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for GpuFrameParts<'a>

§

impl<'a> !UnwindSafe for GpuFrameParts<'a>

§

impl<'a> Forget for GpuFrameParts<'a>

§

impl<'a> Freeze for GpuFrameParts<'a>
where &'a Device: Freeze, &'a Queue: Freeze, &'a TextureView: Freeze, &'a mut CommandEncoder: Freeze, &'a mut Vec<GpuEvent>: Freeze,

§

impl<'a> Move for GpuFrameParts<'a>

§

impl<'a> Send for GpuFrameParts<'a>
where &'a Device: Send, &'a Queue: Send, &'a TextureView: Send, Arc<Global>: Send, NonZero<u64>: Send, Arc<Mutex<ErrorSinkRaw>>: Send, Arc<Mutex<DeferredCommandBufferActions>>: Send, RawVecInner: Send, Arc<str>: Send, NodeRef<Owned, String, Value, LeafOrInternal>: Send, BoxRaw<(String, Value)>: Send,

§

impl<'a> Sync for GpuFrameParts<'a>
where Arc<CoreDevice>: Sync, Arc<CoreQueue>: Sync, Arc<CoreTextureView>: Sync, Arc<CoreTexture>: Sync, InternalBitFlags: Sync, Arc<Global>: Sync, NonZero<u64>: Sync, Arc<Mutex<ErrorSinkRaw>>: Sync, Arc<Mutex<DeferredCommandBufferActions>>: Sync, RawVecInner: Sync, Arc<str>: Sync, NodeRef<Owned, String, Value, LeafOrInternal>: Sync, BoxRaw<(String, Value)>: Sync,

§

impl<'a> Unpin for GpuFrameParts<'a>
where &'a Device: Unpin, &'a Queue: Unpin, &'a TextureView: Unpin, &'a mut CommandEncoder: Unpin, &'a mut Vec<GpuEvent>: Unpin,

§

impl<'a> UnsafeUnpin for GpuFrameParts<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,