#[non_exhaustive]pub struct ValidateStateMachineDefinitionDiagnostic {
pub severity: ValidateStateMachineDefinitionSeverity,
pub code: String,
pub message: String,
pub location: Option<String>,
}
Expand description
Describes potential issues found during state machine validation. Rather than raise an exception, validation will return a list of diagnostic elements containing diagnostic information.
The ValidateStateMachineDefinitionlAPI might add new diagnostics in the future, adjust diagnostic codes, or change the message wording. Your automated processes should only rely on the value of the result field value (OK, FAIL). Do not rely on the exact order, count, or wording of diagnostic messages.
List of warning codes
- NO_DOLLAR
-
No
.$
on a field that appears to be a JSONPath or Intrinsic Function. - NO_PATH
-
Field value looks like a path, but field name does not end with 'Path'.
- PASS_RESULT_IS_STATIC
-
Attempt to use a path in the result of a pass state.
List of error codes
- INVALID_JSON_DESCRIPTION
-
JSON syntax problem found.
- MISSING_DESCRIPTION
-
Received a null or empty workflow input.
- SCHEMA_VALIDATION_FAILED
-
Schema validation reported errors.
- INVALID_RESOURCE
-
The value of a Task-state resource field is invalid.
- MISSING_END_STATE
-
The workflow does not have a terminal state.
- DUPLICATE_STATE_NAME
-
The same state name appears more than once.
- INVALID_STATE_NAME
-
The state name does not follow the naming convention.
- STATE_MACHINE_NAME_EMPTY
-
The state machine name has not been specified.
- STATE_MACHINE_NAME_INVALID
-
The state machine name does not follow the naming convention.
- STATE_MACHINE_NAME_TOO_LONG
-
The state name exceeds the allowed length.
- STATE_MACHINE_NAME_ALREADY_EXISTS
-
The state name already exists.
- DUPLICATE_LABEL_NAME
-
A label name appears more than once.
- INVALID_LABEL_NAME
-
You have provided an invalid label name.
- MISSING_TRANSITION_TARGET
-
The value of "Next" field doesn't match a known state name.
- TOO_DEEPLY_NESTED
-
The states are too deeply nested.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.severity: ValidateStateMachineDefinitionSeverity
A value of ERROR
means that you cannot create or update a state machine with this definition.
WARNING
level diagnostics alert you to potential issues, but they will not prevent you from creating or updating your state machine.
code: String
Identifying code for the diagnostic.
message: String
Message describing the diagnostic condition.
location: Option<String>
Location of the issue in the state machine, if available.
For errors specific to a field, the location could be in the format: /States/
, for example: /States/FailState/ErrorPath
.
Implementations§
Source§impl ValidateStateMachineDefinitionDiagnostic
impl ValidateStateMachineDefinitionDiagnostic
Sourcepub fn severity(&self) -> &ValidateStateMachineDefinitionSeverity
pub fn severity(&self) -> &ValidateStateMachineDefinitionSeverity
A value of ERROR
means that you cannot create or update a state machine with this definition.
WARNING
level diagnostics alert you to potential issues, but they will not prevent you from creating or updating your state machine.
Source§impl ValidateStateMachineDefinitionDiagnostic
impl ValidateStateMachineDefinitionDiagnostic
Sourcepub fn builder() -> ValidateStateMachineDefinitionDiagnosticBuilder
pub fn builder() -> ValidateStateMachineDefinitionDiagnosticBuilder
Creates a new builder-style object to manufacture ValidateStateMachineDefinitionDiagnostic
.
Trait Implementations§
Source§impl Clone for ValidateStateMachineDefinitionDiagnostic
impl Clone for ValidateStateMachineDefinitionDiagnostic
Source§fn clone(&self) -> ValidateStateMachineDefinitionDiagnostic
fn clone(&self) -> ValidateStateMachineDefinitionDiagnostic
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl PartialEq for ValidateStateMachineDefinitionDiagnostic
impl PartialEq for ValidateStateMachineDefinitionDiagnostic
Source§fn eq(&self, other: &ValidateStateMachineDefinitionDiagnostic) -> bool
fn eq(&self, other: &ValidateStateMachineDefinitionDiagnostic) -> bool
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for ValidateStateMachineDefinitionDiagnostic
Auto Trait Implementations§
impl Freeze for ValidateStateMachineDefinitionDiagnostic
impl RefUnwindSafe for ValidateStateMachineDefinitionDiagnostic
impl Send for ValidateStateMachineDefinitionDiagnostic
impl Sync for ValidateStateMachineDefinitionDiagnostic
impl Unpin for ValidateStateMachineDefinitionDiagnostic
impl UnwindSafe for ValidateStateMachineDefinitionDiagnostic
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the foreground set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red()
and
green()
, which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg()
:
use yansi::{Paint, Color};
painted.fg(Color::White);
Set foreground color to white using white()
.
use yansi::Paint;
painted.white();
Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the background set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red()
and
on_green()
, which have the same functionality but
are pithier.
§Example
Set background color to red using fg()
:
use yansi::{Paint, Color};
painted.bg(Color::Red);
Set background color to red using on_red()
.
use yansi::Paint;
painted.on_red();
Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute
value
.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold()
and
underline()
, which have the same functionality
but are pithier.
§Example
Make text bold using attr()
:
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);
Make text bold using using bold()
.
use yansi::Paint;
painted.bold();
Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi
Quirk
value
.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask()
and
wrap()
, which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk()
:
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);
Enable wrapping using wrap()
.
use yansi::Paint;
painted.wrap();
Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition
value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted
only when both stdout
and stderr
are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);