pub enum TargetDiagnosis {
RustNotInstalled,
WasmTargetNotInstalled,
}
Expand description
TargetDiagnosis represents a problem with the Rust target.
Variants§
RustNotInstalled
Rust is not installed: neither cargo nor rustup is present
WasmTargetNotInstalled
The Rust wasm32-wasi target is not installed: rustup is present but the target isn’t
Trait Implementations§
Source§impl Debug for TargetDiagnosis
impl Debug for TargetDiagnosis
Source§impl Diagnosis for TargetDiagnosis
impl Diagnosis for TargetDiagnosis
Source§fn description(&self) -> String
fn description(&self) -> String
Return a human-friendly description of this problem.
Source§fn treatment(&self) -> Option<&dyn Treatment>
fn treatment(&self) -> Option<&dyn Treatment>
Return a
Treatment
that can (potentially) fix this problem, or
None if there is no automatic fix.Source§fn is_critical(&self) -> bool
fn is_critical(&self) -> bool
Return true if this problem is “critical”, i.e. if the app’s
configuration or environment is invalid. Return false for
“non-critical” problems like deprecations.
Source§impl Treatment for TargetDiagnosis
impl Treatment for TargetDiagnosis
Source§fn 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”.
Source§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,
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. Read more
Source§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,
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.
Auto Trait Implementations§
impl Freeze for TargetDiagnosis
impl RefUnwindSafe for TargetDiagnosis
impl Send for TargetDiagnosis
impl Sync for TargetDiagnosis
impl Unpin for TargetDiagnosis
impl UnwindSafe for TargetDiagnosis
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more