Skip to content

Commit

Permalink
feat: add idempotent_with_uuid convenience method
Browse files Browse the repository at this point in the history
  • Loading branch information
arlyon committed May 18, 2022
1 parent f350a34 commit d9bc63b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/client/request_strategy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ impl RequestStrategy {
}
}

#[cfg(feature = "uuid")]
pub fn idempotent_with_uuid() -> Self {
use uuid::Uuid;
Self::Idempotent(Uuid::new_v4().to_string())
}

pub fn get_key(&self) -> Option<String> {
match self {
RequestStrategy::Once => None,
Expand Down

0 comments on commit d9bc63b

Please sign in to comment.