pub enum StepOutcome<S: EngineSpec> {
Success {
message: Option<Cow<'static, str>>,
metadata: Option<S::CompletionMetadata>,
},
Warning {
message: Cow<'static, str>,
metadata: Option<S::CompletionMetadata>,
},
Skipped {
message: Cow<'static, str>,
metadata: Option<S::SkippedMetadata>,
},
}Variants§
Success
The step completed successfully.
Fields
metadata: Option<S::CompletionMetadata>Optional completion metadata associated with the step.
Warning
The step completed with a warning.
Fields
metadata: Option<S::CompletionMetadata>Optional completion metadata associated with the step.
Skipped
The step was skipped with a message.
Implementations§
Source§impl<S: EngineSpec> StepOutcome<S>
impl<S: EngineSpec> StepOutcome<S>
Sourcepub fn from_generic(
value: StepOutcome<GenericSpec>,
) -> Result<Self, ConvertGenericError>
pub fn from_generic( value: StepOutcome<GenericSpec>, ) -> Result<Self, ConvertGenericError>
Converts a generic version into self.
This version can be used to convert a generic type into a more concrete form.
Sourcepub fn completion_metadata(&self) -> Option<&S::CompletionMetadata>
pub fn completion_metadata(&self) -> Option<&S::CompletionMetadata>
If this outcome represents completion, returns the metadata associated with this event.
Returns None if this outcome represents “skipped”.
Sourcepub fn into_generic(self) -> StepOutcome<GenericSpec>
pub fn into_generic(self) -> StepOutcome<GenericSpec>
Converts self into its generic version.
This version can be used to share data across different kinds of engines.
If any of the data in self fails to serialize to a
serde_json::Value, it will be replaced with
serde_json::Value::Null. Since serde_json::Value represents
an arbitrary JSON value, such data would have failed to serialize
anyway.
Sourcepub fn is_success_or_warning(&self) -> bool
pub fn is_success_or_warning(&self) -> bool
Returns true if the step was successful, including success with warning.
Sourcepub fn is_skipped(&self) -> bool
pub fn is_skipped(&self) -> bool
Returns true if the step was skipped.
Trait Implementations§
Source§impl<S: EngineSpec> Clone for StepOutcome<S>
impl<S: EngineSpec> Clone for StepOutcome<S>
Source§impl<S: EngineSpec> Debug for StepOutcome<S>
impl<S: EngineSpec> Debug for StepOutcome<S>
Source§impl<'de, S: EngineSpec> Deserialize<'de> for StepOutcome<S>
impl<'de, S: EngineSpec> Deserialize<'de> for StepOutcome<S>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl<S> JsonSchema for StepOutcome<S>where
S: JsonSchemaEngineSpec + EngineSpec,
impl<S> JsonSchema for StepOutcome<S>where
S: JsonSchemaEngineSpec + EngineSpec,
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moreSource§impl<S: EngineSpec> PartialEq for StepOutcome<S>
impl<S: EngineSpec> PartialEq for StepOutcome<S>
Source§impl<S: EngineSpec> Serialize for StepOutcome<S>
impl<S: EngineSpec> Serialize for StepOutcome<S>
impl<S: EngineSpec> Eq for StepOutcome<S>
Auto Trait Implementations§
impl<S> Freeze for StepOutcome<S>
impl<S> RefUnwindSafe for StepOutcome<S>where
<S as EngineSpec>::CompletionMetadata: RefUnwindSafe,
<S as EngineSpec>::SkippedMetadata: RefUnwindSafe,
impl<S> Send for StepOutcome<S>
impl<S> Sync for StepOutcome<S>
impl<S> Unpin for StepOutcome<S>
impl<S> UnsafeUnpin for StepOutcome<S>where
<S as EngineSpec>::CompletionMetadata: UnsafeUnpin,
<S as EngineSpec>::SkippedMetadata: UnsafeUnpin,
impl<S> UnwindSafe for StepOutcome<S>where
<S as EngineSpec>::CompletionMetadata: UnwindSafe,
<S as EngineSpec>::SkippedMetadata: UnwindSafe,
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.