acts_next/model/act/retry.rs
1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Clone, Default, Serialize, Deserialize)]
4pub struct Retry {
5 /// times to retry
6 /// 0 means no retry
7 #[serde(default)]
8 pub times: i32,
9}
10
11impl Retry {
12 pub fn new() -> Self {
13 Default::default()
14 }
15
16 pub fn with_times(mut self, times: i32) -> Self {
17 self.times = times;
18 self
19 }
20}