pipeflow 0.0.4

A lightweight, configuration-driven data pipeline framework
Documentation
//! Step trait for transform pipeline stages
//!
//! A Step represents a single processing stage within a multi-step transform.
//! Each step receives messages, processes them, and outputs zero or one message.

use crate::common::message::Message;
use crate::error::Result;

/// Step processes messages within a transform pipeline.
///
/// Unlike `Transform` which is an async trait, `Step` is synchronous because
/// steps are composed within a pipeline and executed sequentially.
pub trait Step: Send + Sync {
    /// Step type name for logging and debugging
    fn step_type(&self) -> &'static str;

    /// Process a single message through this step.
    ///
    /// Returns:
    /// - `Ok(Some(msg))` - message passes through (possibly transformed)
    /// - `Ok(None)` - message is filtered out
    /// - `Err(e)` - processing error
    fn process(&self, msg: Message) -> Result<Option<Message>>;
}