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§
Sourcefn category(self: Vc<Self>) -> Vc<RcStr>where
Self: Sized,
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.