Skip to main content

PipelineBuilder

Struct PipelineBuilder 

Source
pub struct PipelineBuilder { /* private fields */ }
Expand description

Builder for configuring a normalization pipeline.

Provides fine-grained control over which normalization stages are included and in what order. The default configuration matches NormalizationPipeline::standard().

§Examples

// Standard pipeline (equivalent to NormalizationPipeline::standard())
let pipeline = PipelineBuilder::new().build();

// Codegen pipeline (equivalent to NormalizationPipeline::for_codegen())
let pipeline = PipelineBuilder::new()
    .consolidation(Consolidation::Skip)
    .naming(Naming::Skip)
    .build();

// Custom pipeline with extra stages
let pipeline = PipelineBuilder::new()
    .circular_dependency_strategy(ResolutionStrategy::Boxing)
    .add_stage(MyCustomStage)
    .build();

Implementations§

Source§

impl PipelineBuilder

Source

pub fn new() -> Self

Create a new builder with default settings (all stages enabled).

Source

pub fn consolidation(self, consolidation: Consolidation) -> Self

Set the consolidation strategy.

Source

pub fn naming(self, naming: Naming) -> Self

Set the naming resolution strategy.

Source

pub fn circular_dependency_strategy(self, strategy: ResolutionStrategy) -> Self

Set the circular dependency resolution strategy.

Source

pub fn add_stage<S: NormalizationStage + 'static>(self, stage: S) -> Self

Append a custom stage that will run after the built-in stages.

Source

pub fn build(self) -> NormalizationPipeline

Build the configured NormalizationPipeline.

Stages are added in order:

  1. Type consolidation (if not skipped)
  2. Naming resolution (if not skipped, or custom stage)
  3. Circular dependency resolution (always included)
  4. Any extra stages added via add_stage()

Trait Implementations§

Source§

impl Default for PipelineBuilder

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.