mirror of
https://github.com/tower-rs/tower.git
synced 2025-09-28 05:20:57 +00:00
Derive Clone
for RetryLayer
(#726)
This commit is contained in:
parent
664cb35abb
commit
d2f1703c48
@ -2,13 +2,13 @@ use super::Retry;
|
||||
use tower_layer::Layer;
|
||||
|
||||
/// Retry requests based on a policy
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct RetryLayer<P> {
|
||||
policy: P,
|
||||
}
|
||||
|
||||
impl<P> RetryLayer<P> {
|
||||
/// Create a new [`RetryLayer`] from a retry policy
|
||||
/// Creates a new [`RetryLayer`] from a retry policy.
|
||||
pub fn new(policy: P) -> Self {
|
||||
RetryLayer { policy }
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user