API Reference
The complete API documentation for Spring Batch RS is hosted on docs.rs, providing detailed information about all public APIs, traits, and modules.
📖 Complete API Documentation
View Full API Documentation on docs.rs →
The docs.rs documentation includes:
- Complete API reference for all public types and functions
- Detailed examples for each module and function
- Source code links for implementation details
- Feature flag documentation showing what's available with each feature
- Cross-references between related types and traits
🗂️ Module Overview
Here's a quick overview of the main modules and their purposes:
Core Modules
Module | Description | Key Types |
---|---|---|
core::job | Job orchestration and execution | Job , JobBuilder , JobInstance |
core::step | Step execution and management | Step , StepBuilder , StepExecution |
core::item | Core processing interfaces | ItemReader , ItemProcessor , ItemWriter |
Item Processing
Module | Description | Key Types |
---|---|---|
item::csv | CSV file processing | CsvItemReader , CsvItemWriter |
item::json | JSON file processing | JsonItemReader , JsonItemWriter |
item::xml | XML file processing | XmlItemReader , XmlItemWriter |
Database Integration
Module | Description | Key Types |
---|---|---|
item::orm | SeaORM integration | OrmItemReader , OrmItemWriter |
item::rdbc | RDBC database access | RdbcItemReader , RdbcItemWriter |
item::mongodb | MongoDB integration | MongoItemReader , MongoItemWriter |
Tasklets
Module | Description | Key Types |
---|---|---|
tasklet::zip | ZIP compression operations | ZipTasklet , ZipTaskletBuilder |
tasklet::ftp | FTP file operations | FtpPutTasklet , FtpGetTasklet |
Utilities
Module | Description | Key Types |
---|---|---|
item::logger | Debug logging writer | LoggerWriter |
item::fake | Mock data generation | PersonReader |
🔍 Quick API Lookup
Common Patterns
Creating a Job:
use spring_batch_rs::core::job::JobBuilder;
let job = JobBuilder::new()
.start(&step)
.build();
Building a Step:
use spring_batch_rs::core::step::StepBuilder;
let step = StepBuilder::new("my-step")
.chunk(100)
.reader(&reader)
.processor(&processor)
.writer(&writer)
.build();
Implementing ItemProcessor:
use spring_batch_rs::core::item::ItemProcessor;
use spring_batch_rs::BatchError;
impl ItemProcessor<InputType, OutputType> for MyProcessor {
fn process(&self, item: InputType) -> Result<Option<OutputType>, BatchError> {
// Your processing logic here
Ok(Some(transformed_item))
}
}
📋 Error Types
All Spring Batch RS operations use the BatchError
enum for error handling:
pub enum BatchError {
ItemReader(String),
ItemProcessor(String),
ItemWriter(String),
Step(String),
Job(String),
Io(std::io::Error),
Configuration(String),
// ... other variants
}
🏷️ Feature Flags
Spring Batch RS uses feature flags to keep dependencies minimal. See the feature documentation for details on what each feature enables.
📚 Documentation Tips
When browsing the API documentation:
- Use the search box to quickly find specific types or functions
- Check the examples in each module for usage patterns
- Look at the source code links for implementation details
- Follow the cross-references to understand relationships between types
- Check feature requirements for each module
🔗 Related Resources
- Getting Started Guide - Learn the basics
- Examples - Ready-to-run code examples
- Tutorials - Step-by-step guides
- Architecture - Framework design and concepts
📝 Contributing to Documentation
Found an issue with the API documentation or have suggestions for improvement?
- API docs issues: Report on docs.rs
- Code documentation: Open an issue or submit a PR
- Website documentation: Contribute to our docs