| 1 | extern crate transformation_pipelinerust-analyzer cargo transformation-pipeline 0.1.0 transformation_pipeline/; |
| 2 | |
| 3 | use transformation_pipelinerust-analyzer cargo transformation-pipeline 0.1.0 crate/::{TransformationStagerust-analyzer cargo transformation-pipeline 0.1.0 stage/TransformationStage#, StageActionsrust-analyzer cargo transformation-pipeline 0.1.0 result/StageActions#, StageResultrust-analyzer cargo transformation-pipeline 0.1.0 result/StageResult#, TransformationPipelinerust-analyzer cargo transformation-pipeline 0.1.0 pipeline/TransformationPipeline#}; |
| 4 | |
| 5 | struct FirstTransformationrust-analyzer cargo transformation-pipeline 0.1.0 FirstTransformation# {} |
| 6 | |
| 7 | impl TransformationStagerust-analyzer cargo transformation-pipeline 0.1.0 stage/TransformationStage#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#> for FirstTransformationrust-analyzer cargo transformation-pipeline 0.1.0 FirstTransformation# { |
| 8 | |
| 9 | fn runrust-analyzer cargo transformation-pipeline 0.1.0 impl#[FirstTransformation][`TransformationStage<String>`]run().(&self, _previous: Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#) -> StageResultrust-analyzer cargo transformation-pipeline 0.1.0 result/StageResult#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#> { |
| 10 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(StageActionsrust-analyzer cargo transformation-pipeline 0.1.0 result/StageActions#::Nextrust-analyzer cargo transformation-pipeline 0.1.0 result/StageActions#Next#("a".to_ownedrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc str/impl#[str][ToOwned]to_owned().())) |
| 11 | } |
| 12 | } |
| 13 | |
| 14 | struct SecondTransformationrust-analyzer cargo transformation-pipeline 0.1.0 SecondTransformation# {} |
| 15 | |
| 16 | impl TransformationStagerust-analyzer cargo transformation-pipeline 0.1.0 stage/TransformationStage#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#> for SecondTransformationrust-analyzer cargo transformation-pipeline 0.1.0 SecondTransformation# { |
| 17 | |
| 18 | fn runrust-analyzer cargo transformation-pipeline 0.1.0 impl#[SecondTransformation][`TransformationStage<String>`]run().(&self, _previous: Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#) -> StageResultrust-analyzer cargo transformation-pipeline 0.1.0 result/StageResult#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#> { |
| 19 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(StageActionsrust-analyzer cargo transformation-pipeline 0.1.0 result/StageActions#::Skiprust-analyzer cargo transformation-pipeline 0.1.0 result/StageActions#Skip#) |
| 20 | } |
| 21 | |
| 22 | } |
| 23 | |
| 24 | struct ThirdTransformationrust-analyzer cargo transformation-pipeline 0.1.0 ThirdTransformation# {} |
| 25 | |
| 26 | impl TransformationStagerust-analyzer cargo transformation-pipeline 0.1.0 stage/TransformationStage#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#> for ThirdTransformationrust-analyzer cargo transformation-pipeline 0.1.0 ThirdTransformation# { |
| 27 | |
| 28 | fn runrust-analyzer cargo transformation-pipeline 0.1.0 impl#[ThirdTransformation][`TransformationStage<String>`]run().(&self, previous: Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#) -> StageResultrust-analyzer cargo transformation-pipeline 0.1.0 result/StageResult#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#> { |
| 29 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(previous, "a".to_ownedrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc str/impl#[str][ToOwned]to_owned().()); |
| 30 | Okrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#Ok#(StageActionsrust-analyzer cargo transformation-pipeline 0.1.0 result/StageActions#::Nextrust-analyzer cargo transformation-pipeline 0.1.0 result/StageActions#Next#("b".to_ownedrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc str/impl#[str][ToOwned]to_owned().())) |
| 31 | } |
| 32 | |
| 33 | } |
| 34 | |
| 35 | #[testrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/test:] |
| 36 | fn run_pipelinerust-analyzer cargo transformation-pipeline 0.1.0 run_pipeline().() { |
| 37 | let pipeline: TransformationPipelinerust-analyzer cargo transformation-pipeline 0.1.0 pipeline/TransformationPipeline#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#> = TransformationPipelinerust-analyzer cargo transformation-pipeline 0.1.0 pipeline/TransformationPipeline#::newrust-analyzer cargo transformation-pipeline 0.1.0 pipeline/impl#[`TransformationPipeline<T>`]new().(vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc macros/vec!![ |
| 38 | Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/impl#[`Box<T>`]new().(FirstTransformationrust-analyzer cargo transformation-pipeline 0.1.0 FirstTransformation# {}), |
| 39 | Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/impl#[`Box<T>`]new().(SecondTransformationrust-analyzer cargo transformation-pipeline 0.1.0 SecondTransformation# {}), |
| 40 | Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#::newrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/impl#[`Box<T>`]new().(ThirdTransformationrust-analyzer cargo transformation-pipeline 0.1.0 ThirdTransformation# {}), |
| 41 | ]); |
| 42 | |
| 43 | assert_eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/assert_eq!!(pipeline.runrust-analyzer cargo transformation-pipeline 0.1.0 pipeline/impl#[`TransformationPipeline<T>`]run().("z".to_ownedrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc str/impl#[str][ToOwned]to_owned().()).unwraprust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`]unwrap().(), "b".to_ownedrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc str/impl#[str][ToOwned]to_owned().()); |
| 44 | } |