pub struct RetryBudget {
pub max_retries: u32,
pub delay: Duration,
}Expand description
Configuration for automatic tool retry on failure.
Controls how many times a failed tool execution is retried before propagating the error. Applied as a flat delay between attempts (no exponential backoff in V1).
§Example
use std::time::Duration;
use adk_core::RetryBudget;
// Retry up to 2 times with 500ms between attempts (3 total attempts)
let budget = RetryBudget::new(2, Duration::from_millis(500));
assert_eq!(budget.max_retries, 2);Fields§
§max_retries: u32Maximum number of retry attempts (not counting the initial attempt).
E.g., max_retries: 2 means up to 3 total attempts.
delay: DurationDelay between retries. Applied as a flat delay (no backoff in V1).
Implementations§
Trait Implementations§
Source§impl Clone for RetryBudget
impl Clone for RetryBudget
Source§fn clone(&self) -> RetryBudget
fn clone(&self) -> RetryBudget
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RetryBudget
impl RefUnwindSafe for RetryBudget
impl Send for RetryBudget
impl Sync for RetryBudget
impl Unpin for RetryBudget
impl UnsafeUnpin for RetryBudget
impl UnwindSafe for RetryBudget
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more