#[cfg(not(feature = "std"))]
use alloc::{string::String, vec::Vec};
#[cfg(feature = "std")]
use std::{string::String, vec::Vec};
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct Outcome {
pub label: String,
pub effects: Vec<String>,
}
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct Escalation {
pub label: String,
pub route_to: String,
}
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct FailureHandling {
pub label: String,
pub action: String,
}
impl Outcome {
pub fn is_empty(&self) -> bool {
self.label.is_empty()
}
}
impl Escalation {
pub fn is_empty(&self) -> bool {
self.label.is_empty() || self.route_to.is_empty()
}
}
impl FailureHandling {
pub fn is_empty(&self) -> bool {
self.label.is_empty() || self.action.is_empty()
}
}