docs.rs failed to build pipex-0.1.13
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
pipex-0.1.10
Pipex 🚀
A powerful functional pipeline macro for Rust that combines synchronous, asynchronous, and parallel operations with extensible error handling strategies.
✨ Features
- 🔄 Sync Operations: Chain regular synchronous transformations
- ⚡ Async Operations: Handle asynchronous work with automatic await
- 🚀 Parallel Processing: Leverage multiple CPU cores with Rayon (optional)
- 🛡️ Error Handling: Extensible error handling strategies via proc macros
- 🔀 Mixed Workloads: Seamlessly combine different operation types
- 📦 Modular: Optional features for async and parallel processing
🚀 Quick Start
Add this to your Cargo.toml
:
[]
= "0.2.0"
# For async features
= { = "1", = ["full"] }
Basic Synchronous Example
use pipex;
Error Handling Strategies
use ;
async
async
async
Parallel Processing
use pipex;
async
📖 Pipeline Syntax
Syntax | Description | Example | Requires Feature |
---|---|---|---|
|x| expr |
Synchronous transformation | |x| x * 2 |
None |
async |x| { ... } |
Asynchronous operation | async |x| { fetch(x).await } |
async |
||| |x| expr |
Parallel processing | ||| |x| cpu_work(x) |
parallel |
🛡️ Error Handling Strategies
Pipex provides several built-in error handling strategies:
Strategy | Description | Behavior |
---|---|---|
IgnoreHandler |
Ignore errors | Only successful results are kept |
CollectHandler |
Collect all | Both success and error results are kept |
FailFastHandler |
Fail fast | Only error results are kept |
LogAndIgnoreHandler |
Log and ignore | Errors are logged to stderr, then ignored |
Custom Error Handlers
You can implement your own error handling strategies:
use ;
;
async
📚 Complete Examples
Data Processing Pipeline
use ;
use tokio;
async
async
Mixed Synchronous and Asynchronous Pipeline
use ;
use tokio;
async
async
🎯 Features Configuration
Pipex uses feature flags to keep dependencies minimal:
[]
# Minimal installation (sync operations only)
= { = "0.2.0", = false }
# With async support
= { = "0.2.0", = ["async"] }
# With parallel support
= { = "0.2.0", = ["parallel"] }
# Full installation (recommended)
= "0.2.0" # Includes async and parallel by default
📋 Requirements
- Rust 1.75.0 or later
- For async features: tokio runtime
- For parallel features: compatible with rayon
🔧 Contributing
Contributions are welcome! Please see our contributing guidelines.
📄 License
This project is licensed under the MIT License - see the LICENSE-MIT file for details.