pub enum TriggerDiagnosis {
MissingAppTrigger,
InvalidAppTrigger(&'static str),
HttpComponentTriggerMissingRoute(String, bool),
InvalidHttpComponentTrigger(String, &'static str),
}
Expand description
TriggerDiagnosis represents a problem with app trigger config.
Variants§
MissingAppTrigger
Missing app trigger section
InvalidAppTrigger(&'static str)
Invalid app trigger config
HttpComponentTriggerMissingRoute(String, bool)
HTTP component trigger missing route field
InvalidHttpComponentTrigger(String, &'static str)
Invalid HTTP component trigger config
Trait Implementations§
Source§impl Debug for TriggerDiagnosis
impl Debug for TriggerDiagnosis
Source§impl Diagnosis for TriggerDiagnosis
impl Diagnosis for TriggerDiagnosis
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 ManifestTreatment for TriggerDiagnosis
impl ManifestTreatment for TriggerDiagnosis
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. “Add default trigger config”.
Source§fn treat_manifest<'life0, 'life1, 'async_trait>(
&'life0 self,
doc: &'life1 mut DocumentMut,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn treat_manifest<'life0, 'life1, 'async_trait>(
&'life0 self,
doc: &'life1 mut DocumentMut,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Attempt to fix this problem. See
Treatment::treat
.Auto Trait Implementations§
impl Freeze for TriggerDiagnosis
impl RefUnwindSafe for TriggerDiagnosis
impl Send for TriggerDiagnosis
impl Sync for TriggerDiagnosis
impl Unpin for TriggerDiagnosis
impl UnwindSafe for TriggerDiagnosis
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 moreSource§impl<T> Treatment for Twhere
T: ManifestTreatment + Sync,
impl<T> Treatment for Twhere
T: ManifestTreatment + Sync,
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, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
fn dry_run<'life0, 'life1, 'async_trait>(
&'life0 self,
patient: &'life1 PatientApp,
) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
T: '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<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
fn treat<'life0, 'life1, 'async_trait>(
&'life0 self,
patient: &'life1 mut PatientApp,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
Attempt to fix this problem. Return Ok only if the problem is
successfully fixed.