Skip to main content

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

ModuleDescriptionKey Types
core::jobJob orchestration and executionJob, JobBuilder, JobInstance
core::stepStep execution and managementStep, StepBuilder, StepExecution
core::itemCore processing interfacesItemReader, ItemProcessor, ItemWriter

Item Processing

ModuleDescriptionKey Types
item::csvCSV file processingCsvItemReader, CsvItemWriter
item::jsonJSON file processingJsonItemReader, JsonItemWriter
item::xmlXML file processingXmlItemReader, XmlItemWriter

Database Integration

ModuleDescriptionKey Types
item::ormSeaORM integrationOrmItemReader, OrmItemWriter
item::rdbcRDBC database accessRdbcItemReader, RdbcItemWriter
item::mongodbMongoDB integrationMongoItemReader, MongoItemWriter

Tasklets

ModuleDescriptionKey Types
tasklet::zipZIP compression operationsZipTasklet, ZipTaskletBuilder
tasklet::ftpFTP file operationsFtpPutTasklet, FtpGetTasklet

Utilities

ModuleDescriptionKey Types
item::loggerDebug logging writerLoggerWriter
item::fakeMock data generationPersonReader

🔍 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:

  1. Use the search box to quickly find specific types or functions
  2. Check the examples in each module for usage patterns
  3. Look at the source code links for implementation details
  4. Follow the cross-references to understand relationships between types
  5. Check feature requirements for each module

📝 Contributing to Documentation

Found an issue with the API documentation or have suggestions for improvement?


📖 Browse the complete API documentation on docs.rs →