Trait Diagnostic

Source
pub trait Diagnostic:
    Send
    + Sync
    + NonLocalValue
    + ValueDebug {
    // Required methods
    fn category(self: Vc<Self>) -> Vc<RcStr>
       where Self: Sized;
    fn name(self: Vc<Self>) -> Vc<RcStr>
       where Self: Sized;
    fn payload(self: Vc<Self>) -> Vc<DiagnosticPayload>
       where Self: Sized;

    // Provided method
    fn into_plain(self: Vc<Self>) -> Vc<PlainDiagnostic>
       where Self: Sized { ... }
}
Expand description

An arbitrary payload can be used to analyze, diagnose Turbopack’s behavior.

Required Methods§

Source

fn category(self: Vc<Self>) -> Vc<RcStr>
where Self: Sized,

[NOTE]: Psuedo-reserved; this is not being used currently. The type of the diagnostics that can be used selectively filtered by consumers. For example, this could be telemetry, or slow_perf_event, or something else. This is not strongly typed though; since consumer or implementation may need to define own category.

Source

fn name(self: Vc<Self>) -> Vc<RcStr>
where Self: Sized,

Name of the specific diagnostic event.

Source

fn payload(self: Vc<Self>) -> Vc<DiagnosticPayload>
where Self: Sized,

Arbitarary payload included in the diagnostic event.

Provided Methods§

Source

fn into_plain(self: Vc<Self>) -> Vc<PlainDiagnostic>
where Self: Sized,

Trait Implementations§

Implementors§