spin_doctor

Trait Diagnostic

Source
pub trait Diagnostic: Send + Sync {
    type Diagnosis: Diagnosis;

    // Required method
    fn diagnose<'life0, 'life1, 'async_trait>(
        &'life0 self,
        patient: &'life1 PatientApp,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Self::Diagnosis>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

The Diagnose trait implements the detection of a particular Spin app problem.

Required Associated Types§

Source

type Diagnosis: Diagnosis

A Diagnosis representing the problem(s) this can detect.

Required Methods§

Source

fn diagnose<'life0, 'life1, 'async_trait>( &'life0 self, patient: &'life1 PatientApp, ) -> Pin<Box<dyn Future<Output = Result<Vec<Self::Diagnosis>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Check the given PatientApp, returning any problem(s) found.

If multiple independently addressable problems are found, this may return multiple instances. If two “logically separate” problems would have the same fix, they should be represented with the same instance.

Implementors§