Struct wgpu_profiler::scope::Scope[][src]

pub struct Scope<'a, W: ProfilerCommandRecorder> { /* fields omitted */ }

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

Implementations

impl<'a, W: ProfilerCommandRecorder> Scope<'a, W>[src]

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

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

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

Starts a scope nested within this one.

impl<'a> Scope<'a, CommandEncoder>[src]

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

Start a render pass wrapped in a OwningScope.

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

Start a compute pass wrapped in a OwningScope.

Trait Implementations

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

type Target = W

The resulting type after dereferencing.

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

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

Auto Trait Implementations

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

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

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

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

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

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast<T> for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Upcast<T> for T