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]: 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.

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,

Arbitrary payload included in the diagnostic event.

Provided Methods§

Source

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

Trait Implementations§

Source§

impl VcValueTrait for Box<dyn Diagnostic>

Source§

type ValueTrait = dyn Diagnostic

Source§

fn get_trait_type_id() -> TraitTypeId

Returns the type id of the trait object.
Source§

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.
Source§

impl Dynamic<Box<dyn Diagnostic>> for Box<dyn Diagnostic>

Source§

impl Dynamic<Box<dyn ValueDebug>> for Box<dyn Diagnostic>

Source§

impl Upcast<Box<dyn Diagnostic>> for Box<dyn Diagnostic>

Source§

impl Upcast<Box<dyn ValueDebug>> for Box<dyn Diagnostic>

Implementors§