File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,9 @@ use crate::layer::util::Identity;
5151#[ cfg( feature = "buffer" ) ]
5252use crate :: buffer:: Buffer ;
5353
54+ #[ cfg( feature = "retry" ) ]
55+ use crate :: retry:: Retry ;
56+
5457pub mod error {
5558 //! Error types
5659
@@ -961,6 +964,17 @@ pub trait ServiceExt<Request>: tower_service::Service<Request> {
961964 Buffer :: new ( self , bound)
962965 }
963966
967+ /// Returns a retry version of this service.
968+ ///
969+ /// See [`Retry::new()`] for the details.
970+ #[ cfg( feature = "retry" ) ]
971+ fn retry < P > ( self , policy : P ) -> Retry < P , Self >
972+ where
973+ Self : Sized ,
974+ {
975+ Retry :: new ( policy, self )
976+ }
977+
964978 /// Convert the service into a [`Service`] + [`Send`] trait object.
965979 ///
966980 /// See [`BoxService`] for more details.
You can’t perform that action at this time.
0 commit comments