batch_processing/sync/step/
step_builder.rs

1use crate::sync::step::{DeciderCallback, SyncStep};
2
3/// A trait for building synchronous steps.
4pub trait StepBuilderTrait {
5    /// Sets the decider callback for the step.
6    ///
7    /// # Arguments
8    ///
9    /// * `decider` - The decider callback function.
10    ///
11    /// # Returns
12    ///
13    /// Returns a modified builder instance.
14    fn decider(self, decider: DeciderCallback) -> Self;
15
16    /// Configures the step to be tolerant to thrown exceptions.
17    ///
18    /// # Returns
19    ///
20    /// Returns a modified builder instance.
21    fn throw_tolerant(self) -> Self;
22
23    /// Initializes a new builder instance with the given name.
24    ///
25    /// # Arguments
26    ///
27    /// * `name` - The name of the step.
28    ///
29    /// # Returns
30    ///
31    /// Returns a new builder instance.
32    fn get(name: String) -> Self;
33
34    /// Validates the builder configuration.
35    ///
36    /// # Returns
37    ///
38    /// Returns a modified builder instance if validation succeeds.
39    fn validate(self) -> Self;
40
41    /// Builds and returns the configured synchronous step.
42    ///
43    /// # Returns
44    ///
45    /// Returns the configured synchronous step.
46    fn build(self) -> SyncStep;
47}