Struct wgpu_profiler::scope::Scope

source ·
pub struct Scope<'a, W: ProfilerCommandRecorder> { /* private fields */ }
Expand description

Scope that takes a (mutable) reference to the encoder/pass. Calls end_scope on drop.

Implementations§

source§

impl<'a, W: ProfilerCommandRecorder> Scope<'a, W>

source

pub fn start( label: &str, profiler: &'a mut GpuProfiler, recorder: &'a mut W, device: &Device ) -> Self

Starts a new profiler scope. Scope is closed on drop.

source

pub fn scope(&mut self, label: &str, device: &Device) -> Scope<'_, W>

Starts a scope nested within this one.

source§

impl<'a> Scope<'a, CommandEncoder>

source

pub fn scoped_render_pass<'b>( &'b mut self, label: &str, device: &Device, pass_descriptor: &RenderPassDescriptor<'b, '_> ) -> OwningScope<'b, RenderPass<'b>>

Start a render pass wrapped in a OwningScope.

source

pub fn scoped_compute_pass( &mut self, label: &str, device: &Device, pass_descriptor: &ComputePassDescriptor<'_> ) -> OwningScope<'_, ComputePass<'_>>

Start a compute pass wrapped in a OwningScope.

Trait Implementations§

source§

impl<'a, W: ProfilerCommandRecorder> Deref for Scope<'a, W>

§

type Target = W

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl<'a, W: ProfilerCommandRecorder> DerefMut for Scope<'a, W>

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
source§

impl<'a, W: ProfilerCommandRecorder> Drop for Scope<'a, W>

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl<'a, W> !RefUnwindSafe for Scope<'a, W>

§

impl<'a, W> Send for Scope<'a, W>where W: Send,

§

impl<'a, W> Sync for Scope<'a, W>where W: Sync,

§

impl<'a, W> Unpin for Scope<'a, W>

§

impl<'a, W> !UnwindSafe for Scope<'a, W>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
§

impl<T> Downcast<T> for T

§

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 Twhere 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, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.
§

impl<T> Upcast<T> for T

§

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