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]: Pseudo-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.
Provided Methods§
fn into_plain(self: Vc<Self>) -> Vc<PlainDiagnostic>where
Self: Sized,
Trait Implementations§
Source§impl VcValueTrait for Box<dyn Diagnostic>
impl VcValueTrait for Box<dyn Diagnostic>
type ValueTrait = dyn Diagnostic
Source§fn get_trait_type_id() -> TraitTypeId
fn get_trait_type_id() -> TraitTypeId
Returns the type id of the trait object.
Source§fn get_impl_vtables() -> &'static VTableRegistry<Self::ValueTrait>
fn get_impl_vtables() -> &'static VTableRegistry<Self::ValueTrait>
Returns the vtable for an implementation of this trait.
Panics if ValueTypeId does not implement the trait.