Crate tower_async_bridge
source ·Expand description
Tower Async Bridge traits and extensions.
You can make use of this crate in order to:
- Turn a
tower::Service
into atower_async::Service
(requires theinto_async
feature); - Turn a
tower_async::Service
into atower::Service
; - Use a
tower_async::Layer
within atower
environment (e.g.tower::ServiceBuilder
); - Use a
tower::Layer
within atower_async
environment (e.g.tower_async::ServiceBuilder
) (requires theinto_async
feature);
Please check the crate’s unit tests and examples to see specifically how to use the crate in order to achieve this.
Furthermore we also urge you to only use this kind of approach for transition purposes and not as a permanent way of life. Best in our opinion is to use one or the other and not to combine the two. But if you do absolutely must use one combined with the other, this crate should allow you to do exactly that.
Structs
- Service returned by crate::ClassicServiceExt::into_classic.
Traits
- Extension trait for [tower::Service] that provides the ClassicServiceExt::into_classic method.