pub trait Treatment: Sync {
// Required methods
fn summary(&self) -> String;
fn treat<'life0, 'life1, 'async_trait>(
&'life0 self,
patient: &'life1 mut PatientApp,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided method
fn dry_run<'life0, 'life1, 'async_trait>(
&'life0 self,
patient: &'life1 PatientApp,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}Expand description
The Treatment trait represents a (potential) fix for a detected problem.
Required Methods§
Sourcefn summary(&self) -> String
fn summary(&self) -> String
Return a short (single line) description of what this fix will do, as an imperative, e.g. “Upgrade the library”.
Sourcefn treat<'life0, 'life1, 'async_trait>(
&'life0 self,
patient: &'life1 mut PatientApp,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn treat<'life0, 'life1, 'async_trait>(
&'life0 self,
patient: &'life1 mut PatientApp,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Attempt to fix this problem. Return Ok only if the problem is successfully fixed.
Provided Methods§
Sourcefn dry_run<'life0, 'life1, 'async_trait>(
&'life0 self,
patient: &'life1 PatientApp,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn dry_run<'life0, 'life1, 'async_trait>(
&'life0 self,
patient: &'life1 PatientApp,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Return a detailed description of what this fix will do, such as a file diff or list of commands to be executed.
May return Err(DryRunNotSupported.into()) if no such description is
available, which is the default implementation.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".