pipeline_derive 0.1.1

A procedural macro crate to simplify building monadic-like data pipelines in Rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::attributes::{self, PipelineAttributes};
use crate::errors::Result;
use proc_macro2::TokenStream;
use syn::DeriveInput;

use crate::pipeline;

/// Entry point for pipeline code generation.
///
/// Parses pipeline attributes from the input, then delegates to `pipeline::pipeline_derive`.
pub fn pipeline_derive(input: DeriveInput) -> Result<TokenStream> {
    // Parse pipeline attributes from struct attributes (e.g. #[pipeline(skip = true)])
    let attrs: PipelineAttributes = attributes::parse_attributes(&input)?;

    // Delegate to main pipeline derive logic with parsed attributes
    pipeline::pipeline_derive(input, &attrs)
}