tower-pipeline
A Tower Service
combinator that "pipelines" two services.
A [Pipeline
] is a Service
consisting of two other Service
s where the response of the
first is the request of the second. This is analagous to function composition but for
services.
use PipelineExt;
use ;
// service that returns the length of a string
let length_svc = service_fn;
// service that doubles its input
let double_svc = service_fn;
// combine our two services
let combined = length_svc.pipeline;
// call the service
let result = combined.oneshot.await.unwrap;
assert_eq!;
License: MIT