pub struct SseReconnectOptions {
pub retry: RetryOptions,
pub reconnect_on_eof: bool,
pub honor_server_retry: bool,
pub server_retry_max_delay: Option<Duration>,
pub apply_jitter_to_server_retry: bool,
}Expand description
Reconnect behavior options for crate::HttpClient::execute_sse_with_reconnect.
Fields§
§retry: RetryOptionsRetry options used by SSE reconnect delay calculation.
max_attempts includes the initial stream-open attempt, so if callers
want at most N reconnects they should pass max_attempts = N + 1.
reconnect_on_eof: boolWhether to reconnect when the SSE stream ends without an explicit error.
honor_server_retry: boolWhether to honor SSE retry: field as the next reconnect delay.
server_retry_max_delay: Option<Duration>Optional upper bound applied to SSE retry: delay values from server
events.
When None, reconnect runner derives a cap from retry delay strategy
when it has explicit max (Random / Exponential), otherwise it uses
internal default bound.
apply_jitter_to_server_retry: boolWhether jitter should be applied when the reconnect delay comes from SSE
retry: field.
Implementations§
Source§impl SseReconnectOptions
impl SseReconnectOptions
Trait Implementations§
Source§impl Clone for SseReconnectOptions
impl Clone for SseReconnectOptions
Source§fn clone(&self) -> SseReconnectOptions
fn clone(&self) -> SseReconnectOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SseReconnectOptions
impl Debug for SseReconnectOptions
Source§impl Default for SseReconnectOptions
impl Default for SseReconnectOptions
Source§impl PartialEq for SseReconnectOptions
impl PartialEq for SseReconnectOptions
Source§fn eq(&self, other: &SseReconnectOptions) -> bool
fn eq(&self, other: &SseReconnectOptions) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SseReconnectOptions
Auto Trait Implementations§
impl Freeze for SseReconnectOptions
impl RefUnwindSafe for SseReconnectOptions
impl Send for SseReconnectOptions
impl Sync for SseReconnectOptions
impl Unpin for SseReconnectOptions
impl UnsafeUnpin for SseReconnectOptions
impl UnwindSafe for SseReconnectOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T, D> IntoConfigDefault<T> for Dwhere
D: IntoValueDefault<T>,
impl<T, D> IntoConfigDefault<T> for Dwhere
D: IntoValueDefault<T>,
Source§fn into_config_default(self) -> T
fn into_config_default(self) -> T
Converts this fallback value into
T.Source§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
Source§impl<T> IntoValueDefault<T> for T
impl<T> IntoValueDefault<T> for T
Source§fn into_value_default(self) -> T
fn into_value_default(self) -> T
Converts this argument into the default value.