pub struct TemplateStep {
pub id: String,
pub name: String,
pub step_type: String,
pub depends_on: Vec<String>,
pub config: HashMap<String, String>,
pub timeout_secs: u64,
pub retry_count: u32,
}Expand description
A single step definition within a WorkflowTemplate.
Fields§
§id: StringUnique identifier for this step within the template.
name: StringHuman-readable name.
step_type: StringStep type: “transcode”, “normalize”, “archive”, “deliver”, “validate”, “notify”, etc.
depends_on: Vec<String>IDs of steps that must complete before this step starts.
config: HashMap<String, String>Step-specific configuration. Values may contain {param_name} placeholders.
timeout_secs: u64Maximum wall-clock time allowed for the step (seconds).
retry_count: u32Number of automatic retry attempts on failure.
Implementations§
Source§impl TemplateStep
impl TemplateStep
Sourcepub fn new(
id: impl Into<String>,
name: impl Into<String>,
step_type: impl Into<String>,
) -> Self
pub fn new( id: impl Into<String>, name: impl Into<String>, step_type: impl Into<String>, ) -> Self
Create a new step with no dependencies and sensible defaults.
Sourcepub fn with_depends_on(self, deps: Vec<String>) -> Self
pub fn with_depends_on(self, deps: Vec<String>) -> Self
Set dependencies.
Sourcepub fn with_config(
self,
key: impl Into<String>,
value: impl Into<String>,
) -> Self
pub fn with_config( self, key: impl Into<String>, value: impl Into<String>, ) -> Self
Insert a config entry.
Sourcepub fn with_timeout(self, secs: u64) -> Self
pub fn with_timeout(self, secs: u64) -> Self
Set timeout.
Sourcepub fn with_retries(self, count: u32) -> Self
pub fn with_retries(self, count: u32) -> Self
Set retry count.
Trait Implementations§
Source§impl Clone for TemplateStep
impl Clone for TemplateStep
Source§fn clone(&self) -> TemplateStep
fn clone(&self) -> TemplateStep
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TemplateStep
impl Debug for TemplateStep
Source§impl<'de> Deserialize<'de> for TemplateStep
impl<'de> Deserialize<'de> for TemplateStep
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TemplateStep
impl RefUnwindSafe for TemplateStep
impl Send for TemplateStep
impl Sync for TemplateStep
impl Unpin for TemplateStep
impl UnsafeUnpin for TemplateStep
impl UnwindSafe for TemplateStep
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