Skip to content

Commit

Permalink
fix: revert revert retry get (#86)
Browse files Browse the repository at this point in the history
* fix: revert revert retry get

* fix: Add Send + Sync

* fix: client ownerships
  • Loading branch information
bokuweb committed Aug 3, 2020
1 parent eb9d381 commit c07462f
Show file tree
Hide file tree
Showing 8 changed files with 419 additions and 14 deletions.
189 changes: 189 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions raiden-derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ pub fn derive_raiden(input: TokenStream) -> TokenStream {
)*
table_prefix: String,
table_suffix: String,
retry_condition: ::raiden::RetryCondition,
}

#attr_names
Expand Down Expand Up @@ -174,15 +175,21 @@ pub fn derive_raiden(input: TokenStream) -> TokenStream {
table_prefix: "".to_owned(),
table_suffix: "".to_owned(),
client,
retry_condition: ::raiden::RetryCondition::new(),
}
}

pub fn table_prefix(mut self, prefix: impl Into<String>) -> Self {
pub fn with_retries(&mut self, s: Box<dyn ::raiden::retry::RetryStrategy + Send + Sync>) -> &mut Self {
self.retry_condition.strategy = s;
self
}

pub fn table_prefix(&mut self, prefix: impl Into<String>) -> &mut Self {
self.table_prefix = prefix.into();
self
}

pub fn table_suffix(mut self, suffix: impl Into<String>) -> Self {
pub fn table_suffix(&mut self, suffix: impl Into<String>) -> &mut Self {
self.table_suffix = suffix.into();
self
}
Expand Down
Loading

0 comments on commit c07462f

Please sign in to comment.