Skip to main content

Module ext

Module ext 

Source
Expand description

§Extensions for the customizability on usage of Step.

Optional enhancements that add runtime flexibility to static pipelines.

§Conditional Decorators

The DecoratorExt trait provides some extensions that make the world easier

§.when()

allowing decorators to be conditionally applied based on input predicates. This maintains the zero-cost property - conditions are evaluated inline without dynamic dispatch.

The condition check becomes part of the generated machine code, with no additional abstraction layers.

// The pipeline will never be executed due to the invalidity of the condition passed in.
let builder = Builder {val: 2}
                .step(ConditionalLongProcessing.when(|_| false));

Structs§

ConditionDecorator
Special decorator for validating upon advent of predicate

Traits§

DecoratorExt
A trait extends the optional validation on the decorator being declared