Trait bevy_render::diagnostic::RecordDiagnostics

source ·
pub trait RecordDiagnostics: Send + Sync {
    // Provided methods
    fn time_span<E, N>(
        &self,
        encoder: &mut E,
        name: N
    ) -> TimeSpanGuard<'_, Self, E>
       where E: WriteTimestamp,
             N: Into<Cow<'static, str>> { ... }
    fn pass_span<P, N>(
        &self,
        pass: &mut P,
        name: N
    ) -> PassSpanGuard<'_, Self, P>
       where P: Pass,
             N: Into<Cow<'static, str>> { ... }
}
Expand description

Allows recording diagnostic spans.

Provided Methods§

source

fn time_span<E, N>( &self, encoder: &mut E, name: N ) -> TimeSpanGuard<'_, Self, E>
where E: WriteTimestamp, N: Into<Cow<'static, str>>,

Begin a time span, which will record elapsed CPU and GPU time.

Returns a guard, which will panic on drop unless you end the span.

source

fn pass_span<P, N>(&self, pass: &mut P, name: N) -> PassSpanGuard<'_, Self, P>
where P: Pass, N: Into<Cow<'static, str>>,

Begin a pass span, which will record elapsed CPU and GPU time, as well as pipeline statistics on supported platforms.

Returns a guard, which will panic on drop unless you end the span.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T: RecordDiagnostics> RecordDiagnostics for Option<Arc<T>>

Implementors§