azeventhubs 0.20.0

An unofficial AMQP 1.0 rust client for Azure Event Hubs
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use std::time::Duration;

///A policy governinng retrying of operations.
pub trait EventHubsRetryPolicy: Clone {
    /// Calculates the amount of time before considering the operation to have timed out.
    fn calculate_try_timeout(&self, attempt_count: u32) -> Duration;

    /// Calculates the amount of time to wait before retrying an operation.
    fn calculate_retry_delay(
        &self,
        last_error: &dyn std::error::Error,
        attempt_count: u32,
    ) -> Option<Duration>;
}